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 |
Hint: The nat prerouting rules get run before the filter INPUT rules do. In other words: iptables -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT
|
One more time I can count on its aid.
Very thankz Matir! :) :) |
No problem. Always glad to be able to help. :)
|
All times are GMT -5. The time now is 10:16 PM. |