Can I create dstnat rules without specifying the inbound-interface?
set nat destination rule 99 destination address '8.8.8.8'
set nat destination rule 99 destination port '53'
set nat destination rule 99 inbound-interface 'eth0.110'
set nat destination rule 99 protocol 'udp'
set nat destination rule 99 translation address 'xxx.xxx.24.10'
set nat destination rule 99 translation port '53'
I have a need to redirect all opendns traffic to our dns, but the problem is when there are too many users pppoe / interface, so I have to create rules one by one for each interface.
for example on a mikrotik router you can create rules without having to specify a specific interface ip firwall nat add action=redirect chain=dstnat dst-address-list=opendns dst-port=53 protocol=udp src-address-list=!bypass-open-dns to-ports=53
I cant use this option, with erro log, running on rc.6
WARNING: rule “100” interface “!eth4.1000” does not exist on this system
Interface is already up
show interfaces ethernet eth4.1000
eth4.1000@eth4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
configuration commands
set nat destination rule 100 destination address ‘8.8.8.8’
set nat destination rule 100 destination port ‘53’
set nat destination rule 100 inbound-interface ‘!eth4.1000’
set nat destination rule 100 protocol ‘udp’
set nat destination rule 100 translation address ‘x.x.x.10’
set nat destination rule 100 translation port ‘53’
Can you share your commit output?
If it says warning, config should be committed properly, and this is just a warning message.
Please, share commit result. Also, with “sudo iptables -S”, you may look for that entry in iptables.