[ALUG] Mapping a local IP to a remote one
steve at offend.me.uk
Tue May 26 12:26:49 BST 2015
-----BEGIN PGP SIGNED MESSAGE-----
If it's just for this thing then you could simply set up an ssh tunnel
on your PC.
ssh -N -L 0.0.0.0:8888:127.0.0.1:1234 user at 192.168.2.100
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:192.168.2.100:1234
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) 192.168.1.10, and it can access a remote device
> (192.168.2.100) via a VPN.
> What I want to do is give my PC an extra IP address (eg 192.168.1.11)
> and map all network traffic to that IP address (on any port, and
> including broadcast traffic) to 192.168.2.100, and send any responses
> In doing so, any other PC on my LAN would be able to access the remote
> device as if it were local (192.168.1.11).
> 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 192.168.2.100 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 192.168.1.0/24, so I need to fake
> 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
> Unsubscribe? See message headers or the web site above!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
-----END PGP SIGNATURE-----
More information about the main