Re: weird Iptables problem
From: Eric Teuber (eric000_at_gmx.net)
Date: 08/17/05
- Previous message: Jani Mikkonen: "Re: httpd error log"
- In reply to: AY Xu: "weird Iptables problem"
- Next in thread: AY Xu: "Re: weird Iptables problem"
- Reply: AY Xu: "Re: weird Iptables problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 17 Aug 2005 22:19:19 +0200
AY Xu wrote:
> RHEL3, Iptables 1.2.8-12. Two network interfaces(eth0 202.158.174.62,
> eth1 192.168.0.9). Web server runs at 192.168.0.6, on port 80. Domain
> www.chiaotai.com, DNS query to 202.158.174.62(FQDN).
>
> ------------- iptables script(part)--------------------------------
> #!/bin/bash
> ipt=/sbin/iptables
> $ipt -F
> $ipt -X
> $ipt -Z
> $ipt -t nat -F
>
> IF="eth+"
> INTIF="eth1"
> EXTIF="eth0"
> IPADDR="202.158.174.62/32"
> ## DNAT for Applications
> # Web Server at port 80
> $ipt -t nat -A PREROUTING -i $EXTIF -d $IPADDR -p tcp --dport 80 \
> -j DNAT --to 192.168.0.6:80
> ....skip...
> ------------- iptables script(part)--------------------------------
> I fail to access www.chiaotai.com from internet, and get bellow dump on
> LINUX:
> ------------------------------
> [root@mail etc]# tcpdump -i eth0 port 80 -n
> tcpdump: listening on eth0
> 00:01:21.268141 222.69.230.70.1499 > 202.158.174.62.http: S
> 3071094721:3071094721(0) win 64240 <mss 1452,nop,nop,sackOK> (DF) [tos
> 0x60]
> 00:01:24.115554 222.69.230.70.1499 > 202.158.174.62.http: S
> 3071094721:3071094721(0) win 64240 <mss 1452,nop,nop,sackOK> (DF) [tos
> 0x60]
> 00:01:30.125042 222.69.230.70.1499 > 202.158.174.62.http: S
> 3071094721:3071094721(0) win 64240 <mss 1452,nop,nop,sackOK> (DF) [tos
> 0x60]
> ------------------------------
> But if change iptables scripts to:
> $ipt -t nat -A PREROUTING -i $EXTIF -d $IPADDR -p tcp --dport 10080 -j
> DNAT --to 192.168.0.6:10080
> (Sure change IIS port from 80 to 10080)
> Then access address at www.chiaotai.com:10080, all is okay. Run
> "netstat -an", no application takes up port 80.
>
>>>From the tcpdump outputs, it looks like packets to dport 80 on eth0
> were not forwarded to 192.168.0.6. But if change port to 10080, it's
> okay! Don't know why, can anybody explain this?
>
> Thanks for any help
>
> Xu Zuoyin
>
Hi Xu,
this is tricky. seems like your iptables script does not want incoming
or forwarding traffic at port 80 to your webserver.
your tcpdump doesn't really help.
plz provide more information about your iptables config.
Eric
- Previous message: Jani Mikkonen: "Re: httpd error log"
- In reply to: AY Xu: "weird Iptables problem"
- Next in thread: AY Xu: "Re: weird Iptables problem"
- Reply: AY Xu: "Re: weird Iptables problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|