Push Data from port to remote port


Recommended Posts

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 comment
https://www.neowin.net/forum/topic/1342592-push-data-from-port-to-remote-port/
Share on other sites

  • 1 month later...
  On 18/09/2017 at 01:17, 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.

Expand  

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?

  On 29/10/2017 at 22:33, 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?

Expand  

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.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • https://www.neowin.net/news/tags/mastodon/ In short: Federated Twitter (X)
    • Keep in mind it was purchased by an advertising company. I use SearxNG.
    • I am using Waterfox Private Search now that I started using the Waterfox browser on my PC and Android. Both work great* search waterfox net with full stops in between. * I have an issue where making comments on articles on various websites is difficult with Waterfox on Android as it randomly adds spaces and doubles up on text.
    • I can't believe it was only two years since the last time MS raised their prices and now they think they can do it again so soon. Of course they needed to backtrack on this. I hope Nintendo is next.
    • I guess I gotta be even more specific then since I'm looking for an absolute confirmation.  The mini PC has never booted up or powered on by me. I'm assuming it'll be like buying a new PC from a store. Nothing is set up. Like absolutely nothing on the mini PC because I can't emphasize this enough. My USB drive already has Windows set up on it from my other desktop so I know it's clean. So now I connect it to the mini PC before it's even booted up or go to the desktop. I then turn on the mini PC and boot into the USB drive. I should see an existing partition. I'll delete it and then install Windows again over the entire drive. I don't necessarily want to create a separate partition. Once it installs and boots to the desktop, I'm assuming the drive is "clean" and free of any malware/viruses. Basically, this process will eliminate any potential for malware/viruses to still somehow hide in the SSD and then potentially affect me later.  I'm being very anal about this because I really don't trust anything bought from AliExpress, but the price was very tempting.  Is Windows Defender reliable? Afterwards, if I do a full scan and it doesn't find anything in the SSD and the USB drive, can I be confident the mini PC is now safe and secured to enter my banking credentials? If not, what else can I do to be absolutely certain?
  • Recent Achievements

    • Collaborator
      fernan99 earned a badge
      Collaborator
    • Collaborator
      MikeK13 earned a badge
      Collaborator
    • One Month Later
      Alexander 001 earned a badge
      One Month Later
    • One Month Later
      Antonio Barboza earned a badge
      One Month Later
    • Week One Done
      Antonio Barboza earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      584
    2. 2
      ATLien_0
      219
    3. 3
      Michael Scrip
      170
    4. 4
      Xenon
      136
    5. 5
      +FloatingFatMan
      123
  • Tell a friend

    Love Neowin? Tell a friend!