problem iptables
I liberated everything to test.
The Problem that the redirect of the door does not function!
It only functions if the policing INPUT is ACCEPT.
Somebody can help me?
#!/bin/bash
modprobe iptable_nat
modprobe ip_conntrack
modprobe ip_nat_ftp
iptables -F
iptables -Z
iptables -X
iptables -t nat -F
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
echo 1 > /proc/sys/net/ipv4/ip_dynaddr
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 8080 -j REDIRECT --to-port 80
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -i eth1 -j ACCEPT
iptables -A INPUT -i eth0 -p tcp --dport 8080 --syn -j ACCEPT
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -i eth1 -j ACCEPT
Last edited by stomach; 09-22-2005 at 02:39 PM.
|