1
I have a Debian web server and I'm trying to bind 2 public IP addresses to it.
We have 2 internet connections, the modem for the first is at 192.168.1.1 (we'll call the public ip AAA.AAA.AAA.AAA) and the other is at 192.168.2.1 (BBB.BBB.BBB.BBB).
Can someone help me out with the /etc/network/interfaces file?
Right now I can connect from BBB.BBB.BBB.BBB and from the LAN, but not from AAA.AAA.AAA.AAA
I'd like to use 192.168.1.1 for outgoing connections, either one will work though.
Here is my current /etc/network/interfaces file:
auto lo
iface lo inet loopback
allow-hotplug eth0
allow-hotplug eth0:0
allow-hotplug eth0:1
auto eth0
iface eth0 inet static
address 192.168.1.101
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 8.8.8.8 8.8.4.4
auto eth0:0
iface eth0:0 inet static
address BBB.BBB.BBB.BBB
netmask 255.255.255.252
auto eth0:1
iface eth0:1 inet static
address AAA.AAA.AAA.AAA
netmask 255.255.255.252
# gateway 192.168.2.1
Any help would be greatly appreciated.
Thanks!!
Edit: Finally got it working. Found this article http://www.debian-administration.org/article/377/Routing_for_multiple_uplinks which helped a lot. I had to also set up a 3rd interface for the local 192.168.2.1/16 network to route the second connection.
1
What you are asking is not even remotely trivial to do. I am not even sure if you can do this. You are going to have to really complex routing to make this possible. See this as a starting point. http://lartc.org/howto/lartc.rpdb.multiple-links.html
– Zoredache – 2013-10-17T20:50:57.217That seems pretty simple :) Thanks! I'll give this a shot once everyone leaves the office, they're starting to get tired of the website going down ;-) – user264440 – 2013-10-17T21:21:59.727
Still can't quite figure it out. I changed the other gateway lan ip to another subnet to simplify things (192.168.2.1) – user264440 – 2013-10-17T22:50:10.317