All of lore.kernel.org
 help / color / mirror / Atom feed
* problem reach the internal.
@ 2002-11-29 19:32 james.Q.L
  2002-11-30  1:03 ` james.Q.L
  0 siblings, 1 reply; 8+ messages in thread
From: james.Q.L @ 2002-11-29 19:32 UTC (permalink / raw)
  To: netfilter

hi,

i have access to my firewall ip at port 8888 forward to port 80 at internal machine 192.168.0.3 .
but the connection always fail. can someone help me debug ? thanks.


[root@cozy166 public]#iptables -L --line-number -n
Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination         
1    REJECT     tcp  --  0.0.0.0/0            0.0.0.0/0          tcp dpt:6000 reject-with
tcp-reset 

Chain FORWARD (policy DROP)
num  target     prot opt source               destination         
1    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0          state RELATED,ESTABLISHED 
2    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0          
3    ACCEPT     tcp  --  0.0.0.0/0            192.168.0.3        tcp dpt:80 
4    LOG        all  --  0.0.0.0/0            0.0.0.0/0          LOG flags 0 level 4 

Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination         

Chain drop-and-log-it (0 references)
num  target     prot opt source               destination         
1    DROP       all  --  0.0.0.0/0            0.0.0.0/0          

[root@cozy166 public]#iptables -L --line-number -n -t nat
Chain PREROUTING (policy ACCEPT)
num  target     prot opt source               destination         
1    DNAT       tcp  --  0.0.0.0/0            0.0.0.0/0          tcp dpt:8888 to:192.168.0.3:80 

Chain POSTROUTING (policy ACCEPT)
num  target     prot opt source               destination         
1    SNAT       tcp  --  192.168.0.0/24       192.168.0.3        tcp dpt:80 to:192.168.0.1 
2    MASQUERADE  all  --  0.0.0.0/0            0.0.0.0/0          

Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination         

the rules i added to try to make it work are :

iptables -t nat -A PREROUTING -p tcp -i eth1 --dport 8888 \
	-j DNAT --to-destination 192.168.0.3:80
iptables -A FORWARD -p tcp --dport 80 -d 192.168.0.3 -j ACCEPT
iptables -t nat -A POSTROUTING -p tcp -s 192.168.0.0/24 -d 192.168.0.3 --dport 80 -j SNAT \ 
        --to-source 192.168.0.1



=====
/James.Q.L

______________________________________________________________________ 
Post your free ad now! http://personals.yahoo.ca


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

end of thread, other threads:[~2002-12-01 22:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-29 19:32 problem reach the internal james.Q.L
2002-11-30  1:03 ` james.Q.L
2002-11-30  1:35   ` Anders Fugmann
2002-11-30  2:20     ` Joel Newkirk
2002-11-30  8:34       ` james.Q.L
2002-11-30 15:27         ` Joel Newkirk
2002-12-01 22:35           ` james.Q.L
2002-11-30 11:44       ` Anders Fugmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.