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
iface eth2 inet static
dns-nameservers 192.168.101.249 192.168.101.226 188.8.131.52
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
iface eth1 inet static