Routing traffic to specific web sites through Ethernet, rest via wifi on Mac OS X 10.6?

Posted by user32448 on Super User See other posts from Super User or by user32448
Published on 2010-03-26T20:10:08Z Indexed on 2010/03/26 20:13 UTC
Read the original article Hit count: 305

Filed under:
|
|
|

Hi

I have two separate Internet connections connected to a Mac and I'd like one of them (via Ethernet eth0 gateway 192.168.2.1) to serve for just backing up to an remote online storage, and the other one (via Airport en1 gateway 192.168.1.1) for all other Internet traffic.

I tried using "route" from the terminal as follows:

sudo route add -host 98.207.226.113 -interface eth0

(just for testing against the site www.whatismyip.org whose IP is 98.207.226.113, to see through which gateway the traffic is routed)

I can see using netstat that the route is added:

$ netstat -rn -f inet
Routing tables

Internet:
Destination    Gateway     Flags Refs Use Netif Expire
default        192.168.1.1 UGSc  49   0   en1
98.207.226.113 192.168.2.1 UGSc  0    0   eth0

However, the traffic in this case does NOT get routed properly through Ethernet, as if the routing definition I made is ignored.

Any ideas?

Thanks!

© Super User or respective owner

Related posts about mac

Related posts about route