Freebsd multiple gateways part II
Rite, some time ago I asked about multiple gateways in another thread, I thought I had sorted what I needed, but now I find that somethings are not acting as I thought, and noticed a few people had a few ideas, so now im wondering if there was any more if I explain my situation.Background Scenerio :-
I have a server that is running FREEBSD 4.7-STABLE.
This server has 2 network cards.
Each network card has its own pool of IP's and are on different subnets which are transported by different carriers.
Details :-
The servers main hostname is admin.mghost.net the IP is 66.250.145.138, the default gateway for this is 66.250.145.137, these ips are on the cogent network, all traffic in/out of the server for the ip 66.250.145.138 should be routed through the gateway 66.250.145.137. These are all on the first network card which is an realtek card.
The servers second hostname is test.mghost.net the IP is 69.1.78.8, the default gateway for this is 69.1.78.1, these IP's are on the internap network, all traffic in/out of the server for the ip 69.1.78.8 should be routed through the gateway 69.1.78.1. There are all on the second network card which is an intel thing.
The problem :-
It appears there is no easy way to add a second default gateway, something I did, which I thought was working, is not. all inbound traffic destined for the IP 69.1.78.8 is going through the correct channels and through teh correct nic, however, outgoing traffic is being routed to the default gateway, through the first NIC, so when people connect to the IP 69.1.78.8, the traffic is being sent through the first NIC and through the gateway 66.250.145.137.
The needed solution :-
I need something that will allow me to make traffic that is destined for the IP 69.1.78.8 to be routed through the correct NIC and the correct router, not the default gateway, so traffic from 69.1.78.8 back out again, should go via the gateway 69.1.78.1.