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

linux router & portfw



Hello,

I have a linux machin configured as a router. What i am trying 
to do is use ipmasqasm with portfw module to redirect http requests
that gets to the linux, to a sun box. the sun have a legal IP
with the default gw of one of the linux interfaces. so all trafic coming
and 
going to the sun goes true the linux (other the the redirection all
traffic is fine).
linux routing table:
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
yyy.yyy.yyy.yy  0.0.0.0         255.255.255.240 U     0      0        0
eth2
zzz.zzz.zzz.zz  0.0.0.0         255.255.255.128 U     0      0        0
eth1
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0
lo
0.0.0.0         zzz.zzz.zzz.zz  0.0.0.0         UG    0      0        0
eth1
linux ipchains table:
Chain forward (policy DENY):
target     prot opt     source                destination          
ports
ACCEPT     all  ------  zzz.zzz.zzz.zz/25     0.0.0.0/0             n/a
ACCEPT     all  ------  yyy.yyy.yyy.yy/28     0.0.0.0/0             n/a
ACCEPT     all  ------  0.0.0.0/0             yyy.yyy.yyy.yy/28     n/a
linux ipmasqadm portfw table:
prot localaddr                rediraddr             lport    rport pcnt 
pref
TCP  zzz.zzz.zzz.199          yyy.yyy.yyy.210       80       80    10   
10
So, i think each table is fine by it self, but i still can recive html
pages.
if i use tcpdump to monitor the connection on eth1 or eth2 i see this
traffic:
zzz.zzz.zzz.192.1315 > zzz.zzz.zzz.199.80: S 50758:50758(0) 
zzz.zzz.zzz.192.1315 > yyy.yyy.yyy.210.80: S 50758:50758(0) 
yyy.yyy.yyy.210.80 > zzz.zzz.zzz.192.1315: S 3901138230:3901138230(0)
ack 50759 
yyy.yyy.yyy.210.80 > zzz.zzz.zzz.192.1315: S 3901138230:3901138230(0)
ack 50759 
zzz.zzz.zzz.192.1315 > yyy.yyy.yyy.210.80: R 50759:50759(0)
zzz.zzz.zzz.192.1315 > yyy.yyy.yyy.210.80: R 50759:50759(0)
zzz.zzz.zzz.192.1315 > zzz.zzz.zzz.199.80: S 50758:50758(0) 
zzz.zzz.zzz.192.1315 > yyy.yyy.yyy.210.80: S 50758:50758(0)
yyy.yyy.yyy.210.80 > zzz.zzz.zzz.192.1315: S 3901623923:3901623923(0)
ack 50759 
yyy.yyy.yyy.210.80 > zzz.zzz.zzz.192.1315: S 3901623923:3901623923(0)
ack 50759
zzz.zzz.zzz.192.1315 > yyy.yyy.yyy.210.80: R 50759:50759(0) 
zzz.zzz.zzz.192.1315 > yyy.yyy.yyy.210.80: R 50759:50759(0)
if i understand that corrctly, it's only SYN and RST packets ?
So, where is my mistake ? or maybe i can use ipmasqadm only with
masqurading 
and not simple forwarding ? if so do you know of any such util ?

Thanks,
Guy.


-- 
Guy Cohen
Zapa Digital Arts Ltd.
http://www.zapa.com

=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il