LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-15-2007, 10:57 AM   #1
ajaimes
Member
 
Registered: Dec 2004
Distribution: Ubuntu
Posts: 34

Rep: Reputation: 15
Force service on certain interface


Hello there!

I have a dual internet routing linux computer. One nic has a static IP (eth2). Is there a way to setup iptables to use only eth2 for outgoing email?

Thank you
 
Old 06-15-2007, 06:35 PM   #2
KenJackson
Member
 
Registered: Jul 2006
Location: Maryland, USA
Distribution: Fedora and others
Posts: 757

Rep: Reputation: 145Reputation: 145
Do you have a valid path to the internet on more than one ethernet device? What software routes or divides the traffic?

As for your question, I think I would use the routing table. Maybe something like this:
Code:
route add -host $SMTP_SERVER dev eth2
 
Old 06-18-2007, 10:24 AM   #3
ajaimes
Member
 
Registered: Dec 2004
Distribution: Ubuntu
Posts: 34

Original Poster
Rep: Reputation: 15
Hi!, that looks good, but is there a way to route only SMTP traffic through eth2?

thank you :-)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Force packets to a specific interface glowe Linux - Networking 1 06-13-2007 03:43 PM
how to force sendmail to use a specific interface Finlay Linux - Networking 5 05-14-2006 03:13 PM
php admin interface for any service paul_mat Linux - Software 1 04-19-2006 01:10 PM
Force NIC interface to Full 100 Mbps xmdms Linux - Networking 2 12-09-2004 11:25 AM
Setting up Domain Name Service within Redhat's Gui Interface coffee9876 Linux - Networking 1 12-12-2003 12:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration