Iptables string
Posted
by
Mr. BeatMasta
on Server Fault
See other posts from Server Fault
or by Mr. BeatMasta
Published on 2012-06-27T20:18:13Z
Indexed on
2012/06/27
21:19 UTC
Read the original article
Hit count: 248
I have an iptables rule like this:
iptables -t nat -I PREROUTING -p tcp --dport 80 -s 192.168.1.2 -j DNAT --to-destination 192.168.1.1:80
it works perfectly.. but I want to redirect only for one URL like this:
iptables -t nat -I PREROUTING -p tcp --dport 80 -s 192.168.1.2 -m string --string "google.com" -j DNAT --to-destination 192.168.1.1:80
which does not work in any way... please help me with this
© Server Fault or respective owner