user124384
user124384

Reputation: 410

How to connect two computers on the same local network externally with Python sockets?

I'm currently able to connect a client computer to two servers on my local network (using Python sockets), but because I'm trying to emulate an external networking set-up, I'd like the client to access the machines externally, i.e. for the data to be routed over the internet as opposed to locally and directly. (This is for research purposes, so it's intentionally inefficient.)

Would using a machine's IPv6 address as the host be sufficient, or would the router recognize the IPv6 address as internal and just bounce it back as opposed to first sending it to some external node?

Upvotes: 0

Views: 271

Answers (2)

vilanova
vilanova

Reputation: 77

If the client has at least two interfaces, you can assign one interface for local networking and the other one for Internet connection. In addition, you can also try to use virtual interfaces + IP tunnel for the Internet connection.

Upvotes: 1

Sander Steffann
Sander Steffann

Reputation: 9978

or would the router recognize the IPv6 address as internal and just bounce it back as opposed to first sending it to some external node?

Yes

Upvotes: 1

Related Questions