[ALUG] Mapping a local IP to a remote one

Steve Engledow steve at offend.me.uk
Tue May 26 12:26:49 BST 2015

Hash: SHA256

If it's just for this thing then you could simply set up an ssh tunnel
on your PC.

    ssh -N -L user at

Something like that would map port 8888 on your PC to port 1234 of the remote box.

Though that requires the remote thing to be running ssh. If it isn't,
you could socat. My socat-fu is weak and it's been a while since I've
used it but possibly something like:

    socat TCP-LISTEN:8888 TCP:


On 26/05, Mark Rogers wrote:
> I'm sure that if I could make a decent job of explaining what I mean I
> could Google for this but...
> My PC is (say), and it can access a remote device
> ( via a VPN.
> What I want to do is give my PC an extra IP address (eg
> and map all network traffic to that IP address (on any port, and
> including broadcast traffic) to, and send any responses
> back.
> In doing so, any other PC on my LAN would be able to access the remote
> device as if it were local (
> Can I do this?
> (Background: In this case I have some brain-dead Windows configuration
> software that can only talk to devices on the LAN, so I need to make
> the remote device appear as if it were on the LAN. However I have had
> similar challenges in the past where using a local Linux box as a
> conduit to remote devices would have been useful.)
> If relevant, whilst is not a Linux PC (it's an
> industrial I/O unit), I do have a Linux PC on the remote network that
> could form part of the tunnel if required. The key point is that I
> need the remote unit to appear to be on the local network, not just to
> be accessible from it. My Windows PC can ping (etc) the remote unit
> fine via the VPN itself, but the configuration software will only
> search for and work with devices on, so I need to fake
> it.
> -- 
> Mark Rogers // More Solutions Ltd (Peterborough Office) // 0844 251 1450
> Registered in England (0456 0902) 21 Drakes Mews, Milton Keynes, MK8 0ER
> _______________________________________________
> main at lists.alug.org.uk
> http://www.alug.org.uk/
> http://lists.alug.org.uk/mailman/listinfo/main
> Unsubscribe?  See message headers or the web site above!
Version: GnuPG v2


More information about the main mailing list