iptables multiple ips PRErouting? (--to-destination & -dst)


Hello, my iptables v1.4.21 rule is:
-A PREROUTING -i eth0 -p udp -m udp --dport 1234:1234 -j DNAT --to-destination,

but i get error: Bad IP address ","

How do i define --to-destination parameter for two IPs please?

In the man page on my CentOS 7 i am unable to find description for the -dst and --to-destination parameters.

Or i must create two identic commands one for first and other for second IP?


New Member
Haven't you been using IPtables for a long time now? And that is a very clear error message. The error is telling you you have bad syntax for the ip address. The docs on iptables tell you that only ranges within the same subnet can be defined that way and you say you read the docs.

So since you can't specify the addresses like you want its pretty clear you need two rules, 1 for each. Why didn't you just put those rules in? Would've been quicker than asking someone else.

Members online

Latest posts