Multiple Interfaces + Cisco 515 and default NIC
Debian Sarge
Kernel 2.6.15
I have a box that is in our DMZ behind a couple of routers. The box has 3 interfaces for different apache virtual sites. To get back out of the firewall to the public internet each IP needs to be setup in a translation group on the Cisco. The problem is that I am defaulting out of the one of the new IP's which does not have a translation group setup on the cisco. An easy fix would be to add the translation group for the new IP, but I would rather not do that.
With that said, how do I force public traffic to go out a certain IP/Interface? Everything is leaving from 192.168.1.52 and I would like it to leave via 192.168.1.50...Is this a perfect use for Iptables? If so, what is the easiest way to accomplish this?
/etc/network/interfaces
# The primary network interface
auto eth1
iface eth1 inet static
address 192.168.1.50
network 192.168.1.0
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.1
hostname projects
dns-nameserver 192.168.187.1 192.168.178.2
auto eth1:0
iface eth1:0 inet static
address 192.168.1.51
network 192.168.1.0
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.1
auto eth1:1
iface eth1:1 inet static
address 192.168.1.52
network 192.168.1.0
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.1
Thanks a bunch!
|