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 ESCAA.

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 ESCAA.

3. Restart network

# sh /etc/rc

# /etc/netstart





Comments

Popular posts from this blog

BdsDex: failed to load Boot0001 "UEFI BHYVE SATA DISK BHYVE-OABE-20A5-E582" from PciRoot(0x0)/Pci (0x2, 0x0)/Stat(0x0,0xFFFF,0x0) : Not Found

How to Dockerizing LEMP Stack with Docker-Compose

How To Install Nginx, MySQL and PHP (FEMP) Stack on FreeBSD 13.0