Rellup Posted December 21, 2014 Share Posted December 21, 2014 Buenos días lectores, Quisiera que me ayuden a convertir estos códigos de sockets en c++ para crear un servidor de acuerdo a "no-ip". O bien, volver mi pc un servidor. Mi código funciona con "127.0.0.1", pero como hago para volverlo una botnet o algo parecido ? Tengo entendido que puedo poner en el cliente mi ip pública, pero no funciona... alguien con más experiencia me podría decir ? Tengo entendido que tengo que abrir puertos... ¿qué puertos debo utilizar?¿Abro en router y/o firewall? Sin incomodar al lector, si tienen un código 100% funcional con "no-ip" me interesa estudiarlo. Muchas Gracias, Servidor: This is the hidden content, please Sign In or Sign Up Cliente: This is the hidden content, please Sign In or Sign Up Link to comment Share on other sites More sharing options...
0 Scabtree Posted December 21, 2014 Share Posted December 21, 2014 Re: Ayuda en Sockets C++ In your client use getaddrinfo rather than gethostbyname to get the ip address of the noip dns to connect to. see the following: This is the hidden content, please Sign In or Sign Up and This is the hidden content, please Sign In or Sign Up Link to comment Share on other sites More sharing options...
0 Rellup Posted December 22, 2014 Author Share Posted December 22, 2014 (edited) Re: Ayuda en Sockets C++ Thanks for answer. I tried this: Server: This is the hidden content, please Sign In or Sign Up Cliente: This is the hidden content, please Sign In or Sign Up Netstat -A This is the hidden content, please Sign In or Sign Up Is the same.... Another idea ? I use WIFI to connect to my router. I desactived my Firewall. I give my program with "blablabla.ddns.net" to my friend. He doesn't connect to me. Opinion: I think the problem is on my computer. Connection to my router. Edited December 22, 2014 by Bluffin Link to comment Share on other sites More sharing options...
0 Scabtree Posted December 22, 2014 Share Posted December 22, 2014 Re: Ayuda en Sockets C++ It seems that the server is listening on port 0.0.0.0:2002, so your likely right about the router. On your router, you will need to forward port 2002 to the ip address of your computer. After that, it should be working. You can test it from the outside with This is the hidden content, please Sign In or Sign Up Link to comment Share on other sites More sharing options...
0 Rellup Posted December 22, 2014 Author Share Posted December 22, 2014 (edited) Re: Ayuda en Sockets C++ Thanks. The error is on my port. Check that: Router: 192.168.1.1 This is the hidden content, please Sign In or Sign Up Scanning.. Port 2002 is closed on xxx.xx.xx.xxx. This is the hidden content, please Sign In or Sign Up I don't understand what happend. I desactived my firewal.. I "open" the port 2002 in my router. I think the problem is because I connect to my router for Wireless All is ok. You know how to fix this ?... Edited December 22, 2014 by Bluffin Link to comment Share on other sites More sharing options...
Question
Rellup
Buenos días lectores,
Quisiera que me ayuden a convertir estos códigos de sockets en c++ para crear un servidor de acuerdo a "no-ip". O bien, volver mi pc un servidor.
Mi código funciona con "127.0.0.1", pero como hago para volverlo una botnet o algo parecido ?
Tengo entendido que puedo poner en el cliente mi ip pública, pero no funciona... alguien con más experiencia me podría decir ?
Tengo entendido que tengo que abrir puertos... ¿qué puertos debo utilizar?¿Abro en router y/o firewall?
Sin incomodar al lector, si tienen un código 100% funcional con "no-ip" me interesa estudiarlo.
Muchas Gracias,
Servidor:
Cliente:
Link to comment
Share on other sites
3 answers to this question
Recommended Posts