* Problems using the iptables REDIRECT command
@ 2008-02-08 15:06 Jeffrey Rogiers
2008-02-08 19:31 ` Pascal Hambourg
0 siblings, 1 reply; 2+ messages in thread
From: Jeffrey Rogiers @ 2008-02-08 15:06 UTC (permalink / raw)
To: netfilter
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Problems using the iptables REDIRECT command
2008-02-08 15:06 Problems using the iptables REDIRECT command Jeffrey Rogiers
@ 2008-02-08 19:31 ` Pascal Hambourg
0 siblings, 0 replies; 2+ messages in thread
From: Pascal Hambourg @ 2008-02-08 19:31 UTC (permalink / raw)
To: netfilter
Hello,
Jeffrey Rogiers a écrit :
>
> 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.
What kind of trouble ?
> I have added
> echo 1 > /proc/sys/net/ipv4/ip_forward
What for ? This is not needed for REDIRECT.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-02-08 19:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-08 15:06 Problems using the iptables REDIRECT command Jeffrey Rogiers
2008-02-08 19:31 ` Pascal Hambourg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox