Networking Forums

Networking Forums > Computer Networking > Linux Networking > iptable rule for bypassing netfilter queue for a matching address.

Reply
Thread Tools Display Modes

iptable rule for bypassing netfilter queue for a matching address.

 
 
ArifulHossain tuhin
Guest
Posts: n/a

 
      01-14-2012, 10:28 AM
I have two iptable rules for userspace modification :

iptable -t mangle -A PREROUTING -p udp --dport 9090 -j NFQUEUE
iptable -t mangle -A OUTPUT -p udp --sport 9090 -j NFQUEUE

I have the following network setup:

client ---------------->Linux Box or router--------------------->server. What i'm trying to achieve is modifying all packets which comes from client to 9090 port of the Linux Box. Also which packets will go from Linux Box to client. I do not want to manipulate both from or to the server.

So the rules i need will work like this:

If packet comes from client to port 9090 i will modify it. Now the router opens symmetric port when it communicates with the server. That means it opens 9090 port when it communicates with the server and hence get modified bythe second rule(--sport 9090). I want to avoid this.

The rules will be like this:

1.If packet comes from a specific ip block i will accept it. then i will queue the remaining packets based on the destination port it comes to.
2.If packet goes to a specific ip block i will forward it. I will queue theremaining packets based on the source port information.

Thanks in advance.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
IPv6 netfilter state matching: Invalid packets Lukas Barth Linux Networking 1 12-31-2008 03:53 PM
Route by IP address over tun0 - 'ip rule add from a.b.c.d' morleyc@gmail.com Linux Networking 2 07-11-2007 10:38 PM
netfilter can we snat port numbers like ip address muruga Linux Networking 2 12-13-2006 12:18 PM
IpSec rule ordering: <my ip address> or "a specific ip address"? Mattias Nyholm Windows Networking 1 07-13-2004 10:13 PM
Netfilter: Rule matching questions Avi .L. Linux Networking 1 06-26-2003 11:44 AM



1 2 3 4 5 6 7 8 9 10 11