Solved DNS server inside LAN, behind IPFW

Dear Community,

I am running NSD inside my LAN, and it works. But I have another FreeBSD machine acting as Router/Firewall with port forwarding my public IP is assigned to Router/Firewall machine and private IP is assigned to the NSD machine. IPFW has a port forwarding rule on port 53 to NSD machine.

Is my scenario correct? if yes what I am missing? if not what is the right way to run my own DNS server using NSD?

Thanks,
Amr
 
Salaam Community,

I made it by the following:

First configure IPFW port forwarding for TCP/UDP on port 53 as following
Code:
ipfw -q nat 1 config if $wan same_ports unreg_only reset \
    redirect_port tcp 192.168.100.199:domain domain \
    redirect_port udp 192.168.100.199:domain domain

Then add the port forwarding rule as following
Code:
# DNS on 192.168.100.199 Port Redirection
$amr 0450 $skip all from any to 192.168.100.199 domain in via $wan $ks

Now I am able to run my own DNS server inside my LAN using NSD on FreeBSD.

I hope it helps!
 
Back
Top