LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-08-2015, 07:01 AM   #1
oudmaster
LQ Newbie
 
Registered: May 2014
Posts: 6

Rep: Reputation: Disabled
Policy Routing with Linux !!


hi all,

I am using Zeroshell vRouter which is based on Linux !

I am connecting two networks,

is it possible to do policy routing so if smtp traffic comes from one network is redirected to a specific IP address !?


thanks,
 
Old 04-08-2015, 01:14 PM   #2
jstephens84
Senior Member
 
Registered: Sep 2004
Location: Nashville
Distribution: Manjaro, RHEL, CentOS
Posts: 2,098

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by oudmaster View Post
hi all,

I am using Zeroshell vRouter which is based on Linux !

I am connecting two networks,

is it possible to do policy routing so if smtp traffic comes from one network is redirected to a specific IP address !?


thanks,
from a terminal try the following; HOWEVER do not SAVE this change until verified it is working like you expect
Code:
iptables -A PREROUTING -t nat -p tcp -i <inbound interface> --dport -j DNAT --to <ip to forward to>
iptables -A FORWARD -p tcp --dport 25 -d <ip to forward to> -j ACCEPT
It might help if you expand a little bit by giving more information. Even if you have to come up with a false IP scheme just for this post.

Last edited by jstephens84; 04-08-2015 at 01:17 PM. Reason: changed interface information
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Mutiple IPs and network cards routing (source policy routing?) shogun1234 Linux - Networking 1 01-17-2013 12:09 AM
[SOLVED] Linux Firewall with policy base routing - unable to connect mario.almeida Linux - Server 3 03-05-2012 03:19 PM
policy routing mail2mphani Linux - Newbie 1 04-16-2009 12:48 AM
Linux policy routing issue (am I tripping over a kernel bug?) bjsilva1 Linux - Networking 1 08-28-2008 05:05 AM
[help] RH Network Routing Policy princenux Linux - Networking 1 07-04-2004 10:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:31 AM.

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