need assistence for PREROUTING

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

 



I have a webserver/firewall behind a dsl-router.
The router opens port 80,...,...,4444.

machine 1:  192.168.178.112 + Firewall + Webserver Port 80, 1 Nic
machine 2:  192.168.178.32  + Webserver Port 80, 1 Nic

Now i want machine 1 to redirect all requests on Port 4444 to Port 
80 machine 2.


The following does not work:

$IPTABLES -t nat -A PREROUTING -i $ETH -p tcp --sport 
$UNPRIVPORTS --dport 4444 -d xxx.xxx.xxx.xxx -j DNAT --t
o-destination 192.168.178.32

$IPTABLES -A FORWARD -i $ETH -o $ETH --p tcp --sport $UNPRIVPORTS -d 
192.168.178.32 --dport 80 -m state --state NEW -j
 ACCEPT

$IPTABLES -A FORWARD -i $ETH -o $ETH -m state --state 
ETABLISHED,RELATED -j ACCEPT

Any hints?

Thanx.

-- 
Jochen Kaechelin, fvgi242ss, wlanhacking.de
http://mail.wlanhacking.de/cgi-bin/mailman/listinfo
http://www.gissmoh.de - Mein sonstiges Leben!!


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux