# Forward packets to DNS server



## moffet (Mar 3, 2013)

Hello guys.

I'm planning to prepare a router running FreeBSD that will provide the internet for two LANs. The first LAN will be comprise of company's computers, and the second for wifi clients.

We all know that simple routers allow you to set DNS in your hosts to the IP adress of the router itself, and the router will forward (?) packets to the proper DNS server (which he knows).

Host IP: 192.168.0.10
netmask: 255.255.255.0
gateway: 192.168.0.1
DNS: 192.168.0.1

How to achieve the same functionality in FreeBSD?

Thank you.


----------



## J65nko (Mar 3, 2013)

In BIND 9 : Caching and forward-only named.conf you can find a configuration file for a forward-only caching nameserver configuration using  named(8)

Please keep in mind it that this guide was written using OpenBSD as an example, so some specific file locations need to be adjusted to the FreeBSD conventions. So please don't simply copy and paste but use your brain and the man pages


----------



## SirDice (Mar 4, 2013)

Handbook: 30.6 Domain Name System (DNS)


----------

