Push Data from port to remote port


Recommended Posts

Nashy

I'm running a couple of RPis.  The one here at home is on a dynamic IP, which is causing me a few headaches, I don't really want to go the DynDNS route if I can help it, and if I can avoid paying for a static IP, I'd like that.

I will call them P1 = Static, P2 = Dynamic

 

Currently from P1, I can run

 nc -d 202.XX.XX.XXX 30005 | nc 127.0.0.1 30004 &

And that's all good, until P2's IP changes.

However, instead of grabbing the data, I need P2 to push it to P1.  I also need this to operate on reboot, in the background.  I'd love it to restart if it for any reason stops too.

Appreciate any assistance.  I'm a bit useless with Linux, but I'm slowly getting there.

Link to post
Share on other sites
  • 1 month later...
Radium
On 2017-09-18 at 3:17 AM, Nashy said:

I'm running a couple of RPis.  The one here at home is on a dynamic IP, which is causing me a few headaches, I don't really want to go the DynDNS route if I can help it, and if I can avoid paying for a static IP, I'd like that.

I will call them P1 = Static, P2 = Dynamic

 

Currently from P1, I can run


 nc -d 202.XX.XX.XXX 30005 | nc 127.0.0.1 30004 &

And that's all good, until P2's IP changes.

However, instead of grabbing the data, I need P2 to push it to P1.  I also need this to operate on reboot, in the background.  I'd love it to restart if it for any reason stops too.

Appreciate any assistance.  I'm a bit useless with Linux, but I'm slowly getting there.

Sorry for the late reply but have you considered setting up a VPN server on the machine that has a static IP and run a VPN client on the machine that has a dynamic IP?

You can also do a reverse SSH tunnel, which is easier to configure but much more limited but sufficient if all you want is a single port.

 

By DynDNS, do you mean the DynDNS.com or do you mean dynamic DNS in general?

Link to post
Share on other sites
Nashy
2 hours ago, Radium said:

Sorry for the late reply but have you considered setting up a VPN server on the machine that has a static IP and run a VPN client on the machine that has a dynamic IP?

You can also do a reverse SSH tunnel, which is easier to configure but much more limited but sufficient if all you want is a single port.

 

By DynDNS, do you mean the DynDNS.com or do you mean dynamic DNS in general?

I meant dynamic in general.  I got my netcat working fine.  I appreciate the response, I might take a look into it, purely to try and learn more.  The flight tracking hobby I was attempting here is coming to an end as I want to play more with the Pi.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.