Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Help with IP Tables
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
jbar25
n00b
n00b


Joined: 15 Aug 2006
Posts: 2

PostPosted: Tue Aug 15, 2006 6:41 pm    Post subject: Help with IP Tables Reply with quote

Hi I am using multiple networks(nics) on my server at home. I am planning to use my primay ISP as my main traffic line and I am planning to use a wireless network to handle certain types of traffic traveling over certain port protocols. I am trying to find some help writing a generic ip tables script that will tell the kernel to route traffic from this range of ports over wlan0 and all other protocols over eth0. Has anyone here ever done this? Any help would be greatly appreciated. I have been searching google and the only thing that I can find that would help me out any looks like the MANGLE command for marking packets, but I am still unsure of how to tell IP tables to route this properly.
Back to top
View user's profile Send private message
pteppic
l33t
l33t


Joined: 28 Nov 2005
Posts: 781

PostPosted: Tue Aug 15, 2006 9:52 pm    Post subject: Reply with quote

The question is a little vague and I don't want to send you in the wrong direction, can you give a specific network configuration and application as an example please.
Back to top
View user's profile Send private message
jbar25
n00b
n00b


Joined: 15 Aug 2006
Posts: 2

PostPosted: Tue Aug 15, 2006 10:27 pm    Post subject: Reply with quote

I have two ISP's. One is wireless and one is hardwired. Basically I want my bandwidth consuming apps, such as bittorrent and ftp, to be routed across one isp (wireless wlan0) and all of my regular internet usage traffic to go over my other ISP (wired eth0 cable modem) But I would like for IP Tables to do the routing by port protocol. Such as all inbound and outbound traffic on port 21 and 6881-7000 to go through wlan0 and all other traffic * to go through eth0. I already have everything setup as far as applications and hardware are concerned but I am having trouble writing a script because I dont know where to begin on advanced routing. Thanks for any help.
Back to top
View user's profile Send private message
pteppic
l33t
l33t


Joined: 28 Nov 2005
Posts: 781

PostPosted: Wed Aug 16, 2006 12:04 am    Post subject: Reply with quote

Right, this is a very tenious description of what you have to do, I understand it in principle only.
Use iptables mangle tables to mark the outgoing packets, then (using iproute2) pick up on that mark and use a custom routing table for them.

This seems to give you the best starting point http://www.tldp.org/HOWTO/Adv-Routing-HOWTO/lartc.netfilter.html

I'm quite interested in your results, and would be happy to setup a 'test environment' at this end in VMWare if you have too much trouble (have a redundant ADSL connection laying around idle I may make use of until 'they' stop paying for it :wink: )
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum