A
A
Alexey Pomogaev2011-06-06 16:50:42
linux
Alexey Pomogaev, 2011-06-06 16:50:42

Anyone fumbling in IPTABLES?

In general, there is such a config

iptables -t nat -A PREROUTING -p tcp -d 46.4.113.109 --dport 80 -i eth0 -j DNAT --to-destination 192.168.42.91:80
iptables -t nat -A POSTROUTING - s 192.168.42.91 -o eth0 -j SNAT --to 46.4.113.109 The thing

is that when I wget from 46.4.113.109 or any internal Wirth. machine (192.168.42.0/24), I get connection refused for domains served by 192.168.42.91

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
shadowalone, 2011-06-06
@shadowalone

Everything is correct. so be it.
pay attention to your line:
iptables -t nat -A PREROUTING -p tcp -d 46.4.113.109 --dport 80 -i eth0 -j DNAT --to-destination 192.168.42.91:80
-i eth0 - incoming interface 46.4.113.109

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question