Christian Betz on 18 Oct 2009 20:55:13 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PLUG] unique "virtual" IPs for hosts when using multiple interfaces?


The subject probably sounds confusing, so allow me to illustrate:

Say I use my linux system to dial into a remote linux system that is
accepting dialup connections, then use SSH to connect 192.168.1.1
after the PPP connection is established. Furthermore, assume there are
a lot of these systems and I always access them with 192.168.1.1 after
dialing out.

Now, imagine my computer has two modems and I can dial-out to two
hosts at the same time. Let's say that this gives me a ppp0 and a ppp1
interface.

My problem: I want to simultaneously SSH to *both* 192.168.1.1 hosts,
but they have the same IP so I can't just use the route command.

I figured there must be some way to setup some kind of "virtual" IP
each host/interface such that it could be uniquely addressed. So
instead of connecting to 192.168.1.1 after the connection came up, I
would connect to 192.168.1.100 (for ppp0), or 192.168.1.101 (for
ppp1), etc.

>From what I can tell iptables will be involved here. Can anyone point
me in the right direction (or tell me this crazy idea won't work)? I'm
very willing to RTFM but don't know where start with iptables.

Christian

-- 
Q: How many surrealists does it take to change a light bulb?
A: Two, one to hold the giraffe, and the other to fill the bathtub
with brightly colored machine tools.
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug