How to Change DNS on Juniper SRX
By [FILL IN], [FILL IN] · Last updated
Set Junos name servers and DHCP propagation.
Before you start
You need a FirewallDNS account (see pricing). Sign in to your dashboard, register your public IP address and copy your DNS server addresses. Replace <FIREWALLDNS-PRIMARY> and <FIREWALLDNS-SECONDARY> below with them.
Step by step
- Enter configuration mode.
- Set system name servers.
- Update the DHCP pool.
- Commit.
Junos CLI
configure
set system name-server <FIREWALLDNS-PRIMARY>
set system name-server <FIREWALLDNS-SECONDARY>
set access address-assignment pool LAN family inet dhcp-attributes name-server <FIREWALLDNS-PRIMARY>
set access address-assignment pool LAN family inet dhcp-attributes name-server <FIREWALLDNS-SECONDARY>
commitVerify it works
- Renew DHCP on a client (Windows:
ipconfig /renew, macOS: reconnect Wi-Fi). - Run
nslookup example.comand check which server answered. - Open the live log in your dashboard. New lookups should appear within seconds.