Linux Netfilter discussions
 help / color / mirror / Atom feed
* http PREROUTING works but other ports do not
@ 2008-11-11  1:48 mictlan tecutli
  2008-11-12  6:09 ` Grant Taylor
  0 siblings, 1 reply; 4+ messages in thread
From: mictlan tecutli @ 2008-11-11  1:48 UTC (permalink / raw)
  To: netfilter

[-- Attachment #1: Type: text/plain, Size: 649 bytes --]

Hola,

i´m using iptables v1.2.3. i  got a strange problem where i´m using
esentialy the same rules to forward  (PREROUTING) various ports in a
vserver setup with a single static ip (xxx.xxx.xxx). my vservers on on
the 10.10.10.0 network. with the configuration i´ve attached to this
mail, i can view the web pages hosted in 10.10.10.20, but can not reach the ssh servers on the same host, nor those on other hosts. nor can i reach icecast on port 8000. in the config i´ve included, you´ll se i´ve tried subtle variations on the distint hosts. none of the variations you see there work. 

i´d apreciate any help. 


saludo, 
kev

[-- Attachment #2: iptables.rules --]
[-- Type: application/octet-stream, Size: 2199 bytes --]

# Generated by iptables-save v1.3.6 on Mon Nov 10 19:36:22 2008
*mangle
:PREROUTING ACCEPT [24220:15248964]
:INPUT ACCEPT [22833:15132977]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [20501:9117977]
:POSTROUTING ACCEPT [20501:9117977]
COMMIT
# Completed on Mon Nov 10 19:36:22 2008
# Generated by iptables-save v1.3.6 on Mon Nov 10 19:36:22 2008
*raw
:PREROUTING ACCEPT [24220:15248964]
:OUTPUT ACCEPT [20501:9117977]
COMMIT
# Completed on Mon Nov 10 19:36:22 2008
# Generated by iptables-save v1.3.6 on Mon Nov 10 19:36:22 2008
*nat
:PREROUTING ACCEPT [2401:224057]
:POSTROUTING ACCEPT [150:9814]
:OUTPUT ACCEPT [358:23029]
-A PREROUTING -d xxx.xxx.xxx.0/255.255.255.0 -p tcp -m tcp --dport 80 -j DNAT --to-destination 10.10.10.20:80 
-A PREROUTING -i eth0 -p tcp -m tcp --dport 2230 -j DNAT --to-destination 10.10.10.30:22 
-A PREROUTING -d xxx.xxx.xxx.9 -p tcp -m tcp --dport 2220 -j DNAT --to-destination 10.10.10.20:22 
-A PREROUTING -i eth0 -p tcp -m tcp --dport 2260 -j DNAT --to-destination 10.10.10.60:22 
-A PREROUTING -d xxx.xxx.xxx.0/255.255.255.0 -p tcp -m tcp --dport 8000 -j DNAT --to-destination 10.10.10.20:8000 
-A PREROUTING -d xxx.xxx.xxx.0/255.255.255.0 -p tcp -m tcp --dport 2250 -j DNAT --to-destination 10.10.10.50:22 
-A POSTROUTING -s 10.10.10.0/255.255.255.0 -d ! 10.10.10.0/255.255.255.0 -j SNAT --to-source xxx.xxx.xxx.9 
COMMIT
# Completed on Mon Nov 10 19:36:22 2008
# Generated by iptables-save v1.3.6 on Mon Nov 10 19:36:22 2008
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -i dummy0 -j ACCEPT 
-A INPUT -i lo -j ACCEPT 
-A INPUT -s ! 10.10.10.0/255.255.255.0 -p udp -m udp --dport 514 -j DROP 
-A INPUT -s ! 10.10.10.0/255.255.255.0 -p udp -m udp --dport 3551 -j DROP 
-A INPUT -p tcp -m tcp --dport 2250 -j ACCEPT 
-A INPUT -p tcp -m tcp --dport 2230 -j ACCEPT 
-A INPUT -p tcp -m tcp --dport 2220 -j ACCEPT 
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT 
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT 
-A INPUT -p tcp -m tcp --dport 2222 -j ACCEPT 
-A INPUT -p tcp -m tcp --tcp-flags ACK ACK -j ACCEPT 
-A INPUT -j REJECT --reject-with icmp-port-unreachable 
-A OUTPUT -j ACCEPT 
COMMIT
# Completed on Mon Nov 10 19:36:22 2008

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-11-26 17:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-11  1:48 http PREROUTING works but other ports do not mictlan tecutli
2008-11-12  6:09 ` Grant Taylor
2008-11-12 23:02   ` mictlan tecutli
2008-11-26 17:07     ` Grant Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox