Set static IP and DNS for FreeBSD
1. Set IP address and default router
# ee /etc/rc.conf
Add content as following into rc.conf.
ifconfig_em0="inet 192.168.1.18 netmask 255.255.255.0"
defaultrouter="192.168.1.1"
save it, push keyboard buttons ESC, A, A.
2. Setting up DNS
# ee /etc/resolv.conf
Content of resolv.conf
nameserver 8.8.8.8
nameserver 1.1.1.1
save it, push keyboard buttons ESC, A, A.
3. Restart network
# sh /etc/rc
# /etc/netstart
Comments
Post a Comment