Problems using the iptables REDIRECT command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Greetings,

I am trying to make a service reachable by 2 different ports at the
same time i.e.3333 to 7777 on the same machine. But i am having
trouble getting the proper results.

I have added
echo 1 > /proc/sys/net/ipv4/ip_forward

And i have provided the iptables-save output
--------------------------------------------------------------------------------------------------------
# Generated by iptables-save v1.3.8 on Thu Feb  7 20:27:05 2008
*nat
:PREROUTING ACCEPT [33:4245]
:POSTROUTING ACCEPT [22:2937]
:OUTPUT ACCEPT [22:2937]
-A PREROUTING -p tcp -m tcp --dport 3333 -j REDIRECT --to-ports 7777
COMMIT
# Completed on Thu Feb  7 20:27:05 2008
# Generated by iptables-save v1.3.8 on Thu Feb  7 20:27:05 2008
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [4686:1709555]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp -m icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -d 224.0.0.251 -p udp -m udp --dport 5353 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 7777 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT
-A RH-Firewall-1-INPUT -j DROP
COMMIT
# Completed on Thu Feb  7 20:27:05 2008
--------------------------------------------------------------------------------------------------------

Any assistance would be greatly appreciated.
-
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux