iptables: matching multiple ip addresses

Posted by Tax on Server Fault See other posts from Server Fault or by Tax
Published on 2009-10-27T18:58:25Z Indexed on 2010/03/21 21:01 UTC
Read the original article Hit count: 409

Filed under:

Hi guys,

I am working on a iptables rule to apply after my shorewall script has initialized my firewall. I want a spicific IP (10.0.1.19) address in my lan to be redirected to 10.0.64.1 except if it is going to paypal.

I have the following rule, and that works like a charm

iptables -t nat -A PREROUTING ! -d 1.2.3.4 -s 10.0.1.19 -j DNAT --to 10.0.64.1

My problem is that paypal uses multiple ip addresses, and I am not allowed to have multiple IP-addresses.

https://ppmts.custhelp.com/cgi-bin/ppdts.cfg/php/enduser/std%5Fadp.php?p%5Ffaqid=92

On top of this problem I would like to know how to remove the rule again, without having to restart shorewall.

Kind regards

Tax

© Server Fault or respective owner

Related posts about iptables