LinuxQuestions.org
Review your favorite Linux distribution.
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 12-24-2008, 08:12 AM   #1
naghi32
Member
 
Registered: Dec 2008
Distribution: Slackware
Posts: 39

Rep: Reputation: 17
Question Routing question


Hy, I`ve been trying to set up a configuration like the next one
eth0-internet(dhcp)
eth1-internet(dhcp)
eth2-internet(static)
eth3-lan(multiple ip addreeses)

My question is as follows
How do i setup the routing table to route request coming from eth3 from a certain ip FROM a certain port ( or port range ) and that alone should go thru a diferent route than the default one ( wich by the way is multiroute )

i want port 6020 ( from a certain pc in the network) to be nat-ed to go thru the static interface ( and ip )

the thing with answers going back thru the eth3 and toward the host is easy
but the routing part i do not know how to
i mention i DO NOT have the ROUTE target in iptables ( that would simplify ) and i would like this setup to work without the ROUTE target as it`s not only for this server )

Something like
ip rule add from 192.168.0.8/32 port 6020 table rds

LE:
I wonder one more thing:
If i mark the packets in the FORWARD chain of mangle
can i use fwmark in ip route to route those specific packets ?
i`m gonna try and post back later if it works

Last edited by naghi32; 12-24-2008 at 08:17 AM. Reason: LE
 
Old 12-25-2008, 02:37 PM   #2
napo
LQ Newbie
 
Registered: Nov 2008
Distribution: Ubuntu 8.04
Posts: 6

Rep: Reputation: 0
I found some good routing table examples from here:

https://help.ubuntu.com/community/Router

Near the bottom is the code where they setup the iptalbes

Hope this helps...
 
Old 12-25-2008, 04:51 PM   #3
naghi32
Member
 
Registered: Dec 2008
Distribution: Slackware
Posts: 39

Original Poster
Rep: Reputation: 17
Thanks but it is not what i am looking for.
I`ve already set up the networking parameters and the internet connection for the other pc`s
It`s all working perfectly from this point of view.
What i am looking is something a little more complicated. ( connections coming from on pc from port xxxx to go thru a diferent route ...
I`l try some things and the come and post back again if i found something.
 
Old 12-25-2008, 05:55 PM   #4
naghi32
Member
 
Registered: Dec 2008
Distribution: Slackware
Posts: 39

Original Poster
Rep: Reputation: 17
Ok it seems a simple and easy SNAT should do the trick.
I`l give it a try as soon as i found out exacly wich ports does the aplication use for outgoing connections. I hope it uses the same port :|
Oh btw got any ideea how to detect connections related to an established connection ?
because i gotta change theyr destination to make sure they reach the right place :|
 
  


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
Routing Question Pryach Linux - Networking 7 03-07-2006 07:19 PM
routing question hsegtreas Linux - Networking 2 08-28-2004 05:19 PM
IP Routing Question yvesg Linux - Networking 2 05-11-2004 06:13 AM
routing question yenonn Linux - Networking 30 03-22-2004 09:55 AM
routing question freshtonic Linux - Networking 2 07-12-2003 12:35 PM

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

All times are GMT -5. The time now is 06:06 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