0
I’m trying to connect with socket
on another network with Hamachi. When creating the server, I am using the local IP and when connecting I am using the Hamachi IP.
See my code below:
# Código do Servidor
address = ("<IP Local>", 51474)
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server.bind(address)
server.listen(1)
newSocket, clientInfo = server.accept()
# Código do Cliente
address = ("IP do Hamachi", 51474)
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client.connect(address)
print("Conectado com sucesso.")
The problem is that while trying to run the above code, I get the following error:
socket.connect(address)
Connectionrefusederror: [Winerror 10061] No connection could be made because the destination machine actively refused them
Can someone please help me ?
And how did you set up Logmein Hamachi? Did you connect everything correctly? You can go into more detail.
– Guilherme Nascimento
Yes Hamachi is configured correctly and even works in other places, as in games for example. I also disabled the Firewall as it can sometimes prevent access by Hamachi.
– JeanExtreme002
And Telnet was able to access?
– Guilherme Nascimento
I don’t know what that is.
– JeanExtreme002
Run a test trying to hear the address 0.0.0.0 in the server code.
– Daniel Koch
I tested it with the address
0.0.0.0
and now it presented a different error: Timeouterror: [Winerror 10060] A connection attempt failed because the connected component did not respond correctly after a period of time or the established connection failed because the connected host did not respond– JeanExtreme002