Monthly Archives: March 2010

Route traffic (smtp) through specific network interface

The problem; need to force connections to the gmail smtp servers through a mobile broadband modem rather than the main system NIC. The solution; use the route command to add a new persistent route to the IP routing tables for your machine;

route -p add 216.239.59.109 mask 255.255.255.255 XXX.XXX.XXX.XXX metric 1 if 14

where;

  • 216.239.59.109 is the gmail smtp server
  • XXX.XXX.XXX.XXX is the default gatway for the connection you want to route the traffic through
  • if 14 is the id of the NIC you want to use

See this article for more detailsĀ  http://www.windowsnetworking.com/articles_tutorials/Making-Sense-Windows-Routing-Tables.html

Advertisements
%d bloggers like this: