Netcat connection over dynamic IP

1

I was playing around with netcat on my lan , had PC1 configured as a netcat client and PC2 configured as a netcat server into a reverse netcat TCP connection.This whole reverse TCP connection works just perfect so i was wondering .. is it possible to connect 2 different PCs(each one belongs on its own network) with netcat if both networks use dynamic IPs and not static ones?

user226438

Posted 2013-06-24T01:13:51.353

Reputation: 21

Answers

0

Of course it is, as long as:

  • no firewalls are interfering in the path between PC1 and PC2.
  • you know the dynamic IPs in question.
  • if you want to reach hosts behind a NAT router, port forwards are set up correctly.

If the ISP on either end pulls the lease on the dynamic IPs during your connection, it's likely your connection will break at that time.

LawrenceC

Posted 2013-06-24T01:13:51.353

Reputation: 63 487

and taking into account the wider context of the question, ensure that the IP addresses are not in the private ranges. – Journeyman Geek – 2013-06-24T01:37:22.420

Thank you both for your fast reply! Now lets say we dont have any physical access on client PC that connects to our server.When servers IP expires , is there any possible way to inform client that IP changed to a new one?Could we add a webserver in the middle of that connection and do the job? – user226438 – 2013-06-24T01:53:01.223