Re: nat help!
email@example.com a écrit :
im trying to nat some address here
What is the networking environment : interfaces, networks, routers,
hosts, routes, addresses ?
but nothing happeds
Of course something happens. Somethings always HAS to happen. It's just
that sometimes what happens is not what you expect. So you have to find
out what happens to know what's wrong. ;-)
Some tools such as the iptables LOG target and network traffic capture
tools (tcpdump, ethereal) may help you in that burden.
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -t nat -P PREROUTING ACCEPT
iptables -t nat -P POSTROUTING ACCEPT
No defaut policy setting for the OUTPUT chain in the nat table ?
## Empezamos a filtrar
## Nota: eth0 es el interfaz conectado al router y eth1 a la LAN
# El localhost se deja (por ejemplo conexiones locales a mysql)
/sbin/iptables -A INPUT -i lo -j ACCEPT
Useless : according to the above, the INPUT default policy is already
set to ACCEPT.
iptables -t nat -A PREROUTING --dst 10.30.142.12 -p tcp --dport 80 -j DNAT \
According to this rule, incoming HTTP connections (except on loopback
interface) to 10.30.142.12 will be redirected to 10.30.143.1.
echo 1 > /proc/sys/net/ipv4/ip_forward
thats all on my iptables config
what i have to add to make that rule work
This rule sure works. Something else may be wrong.