I have a server with one nic connected to the internal network so it can authenticate internal users on our AD
I then have the other nic on the public IP so that it is available from the internet.
I need to ensure requests sent through the public IP are returned via that nic, and not that on the internal nic.
At the moment, my configuration is as follows, which works for the most, but I'm sure there's a better way of doing it as I cannot access the internet from this server (to install updates etc)
The eth1 address is on our DMZ and is mapped to a public IP by our firewall
Code:
iface eth2 inet static
address 192.168.101.13
netmask 255.255.255.0
network 192.168.101.0
dns-nameservers 192.168.101.249 192.168.101.226 8.8.8.8
post-up route add -net 192.168.0.0 netmask 255.255.0.0 gw 192.168.101.254
pre-down route del -net 192.168.0.0 netmask 255.255.0.0 gw 192.168.101.254
auto eth1
iface eth1 inet static
address 172.16.1.3
netmask 255.255.255.0
network 172.16.1.0
gateway 172.16.1.254
dns-nameservers 8.8.8.8
Bookmarks