0

I am running kernel 3.14.18 and using iptables 1.4.21, built with these options --static-enable --disable-shared.

When I run this command:

/sbin/iptables -A PREROUTING  -m -d 127.3.0.2/24 -j DNAT --to-destination 10.0.0.1 -p udp -dport 69

I get this error message:

iptables v1.4.21: Couldn't load match `-d':No such file or directory

Can anyone help explain what I am missing?

1
  • More info: I have a host system with 2 interfaces, eth0 and eth1. eth0 will receive packets with ip of 127.3.x.x. I want to forward these packets to go out of eth1 to a server (10.0.1). eth1 has ip of 192.168.0.100. the server needs to see the packets as if they are coming from the host (192.168.0.100). I think I can remove -m flag, but when i do, I am getting this error: iptables v1.4.21: multiple -d flags not allowed
    – mikec
    Feb 23, 2015 at 0:48

2 Answers 2

1

I know this is an old post, but for others who come across this via searches....

The -m option is to specify a module to load. Correcting this and the --dport vs -dport mentioned by Augusto you may want.

/sbin/iptables -A PREROUTING -m udp -d 127.3.0.2/24 -j DNAT --to-destination 10.0.0.1 -p udp --dport 69
0

Try --dport instead -dport (missing one -)

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.