# rdr dns requests



## bluetick (Jun 23, 2010)

I need to redirect dns to a single ip, does this line need to be before or after nat??



```
# 
nat/rdr
nat on $ext_if from !($ext_if) to any -> ($ext_if:0)
nat-anchor "ftp-proxy/*"
rdr-anchor "ftp-proxy/*"
rdr on $int_if inet proto udp from any to any port 53 -> 208.67.222.222 port 53
```

Thanks,


----------



## SirDice (Jun 23, 2010)

A rdr always comes _after_ nat rules and _before_ any pass/block rules.

Also keep in mind that DNS also uses TCP, in some cases even for a 'simple' query.


----------



## DutchDaemon (Jun 23, 2010)

The nat rule usually goes first. That would be logical in this case as well, because you're making a call to an external IP address for which NAT needs to be active.


----------

