IPTABLES in RouterOs

Hi all,

I'm considering updating my exiting DDWRT to a routerboard, before I make a purchase I'd like to be sure that routerOS can definatly do the following.

I use a dns proxy for some devices, I have IPTABLES rules to detect any dns requests from certain hosts and redirect them transparently via my dns proxy. Below is the IPTABLES rules I use, can this be achieved in RouterOS, if so how?

1.2.3.4 would be the DNS proxy IP

iptables -t nat -A PREROUTING -i br0 -s ROKU -p tcp --dport 53 -j DNAT --to 1.2.3.4
iptables -t nat -A PREROUTING -i br0 -s ROKU -p udp --dport 53 -j DNAT --to 1.2.3.4

Thanks

yup, but examples are easly findable in google :wink:

/ip firewall nat
add action=dst-nat chain=dstnat disabled=no dst-port=53 in-interface=bridge1 protocol=udp src-address=192.168.88.0/24 to-addresses=1.2.3.4

Thanks for confirming, will place an order for a Routerboard :slight_smile:

Sorry forgot to ask, can this rule also be applied to all devices on a VLAN, rather then setting it at a device level?

Thanks

Vlan is considered a virtual interface in routeros, and supports/provides “same functionality” as physical interface.

Thanks!