Results 1 to 2 of 2
Hi,
I am trying to figure out a method to redirect UDP traffic to a single socket to userspace app using iptables. My system runs on 2.4 kernel and currently ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 03-31-2009 #1Just Joined!
- Join Date
- Mar 2009
- Posts
- 4
iptables redirecting to different port
Hi,
I am trying to figure out a method to redirect UDP traffic to a single socket to userspace app using iptables. My system runs on 2.4 kernel and currently NAT is not used.
After some analysis i figured out iptables can be used to redirect traffic based on matching rules to a different port. my assumption is that i can add a rule in input chain of filter table to divert udp traffic within source port ranges to a new port.
when i tried to use the follwing command
iptables -t filter -A INPUT -i eth0 -p udp --sport 9000:9010 -j REDIRECT --to-ports 9050
it returns as Invalid argument
Please help me with the above rule - is my assumption correct?
will any other method or rule will be required?
murugan
- 03-31-2009 #2
Please see this IPTABLES TUTORIAL.


Reply With Quote
