up vote 2 down vote favorite
share [g+] share [fb]

I'm planning to build a Linux box with 2 virtual instances of Windows 2003 server (VPS#1 & VPS#2). I want each Win2003 instance to access its own ADSL dialup account and have its own public IP and bandwidth.

Is it possible to use 1 Linux box with 2 NICs connected to each ADSL modem & phone line to dial-up to 2 separate ADSL dial-up accounts? Then only let VPS#1 access ADSL#1 and VPS#2 access ADSL#2?

link|improve this question

feedback

2 Answers

up vote 1 down vote accepted

try this:

iptables -A FORWARD -i $EXTIF -o $INTIF -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT
iptables -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE

where $EXTIF is your ADSL interface on linux box and $INTIF is your windows VM internal IP

Repeat for both VMs with different INTIF and EXTIF combination

link|improve this answer
not sure iptables can apply the FORWARD chain to packets generated internally.. I'd go for iproute2 – lorenzog Feb 8 '10 at 9:25
I haven't tried this yet (planning stage), but assuming if I setup the iptables correctly, do I just use VPS's built-in Windows PPPOE dialer to dial-up through the ADSL modem? – Level1Coder Feb 8 '10 at 14:40
nope, you'd have to establish connections from linux. these rules will then masquerade connections out from windows to the internet. – rytis Feb 8 '10 at 14:54
Tks! I have a better understanding now. It sounds like it should work 8-) After I finish building the new system, I'll re-visit this question if I encounter any problems. – Level1Coder Feb 8 '10 at 15:44
feedback

Yes its possible Use 192.168.1.X and 192.168.2.X to access 2 diff cards respectively, and provide access via ip tables and squid.

link|improve this answer
Do I still need squid if I just want to use the built-in Windows PPPOE dialer to connect to the Internet? I'd like to make it so that the Linux host is as transparent as possible and VPS#1 & VPS#2 see the ADSL modems as if they were physically directly connected so that the built-in Windows PPPOE dialers can access the ADSL modem, dial-up and login to access the Internet. – Level1Coder Feb 8 '10 at 14:36
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.