Skip to content

Instantly share code, notes, and snippets.

@soediro
Created September 23, 2025 10:58
Show Gist options
  • Select an option

  • Save soediro/b1495756952c7c43b2e40ad1122a701c to your computer and use it in GitHub Desktop.

Select an option

Save soediro/b1495756952c7c43b2e40ad1122a701c to your computer and use it in GitHub Desktop.

๐Ÿ”น 1. Check Network Interfaces

Run:

ifconfig

This lists all network interfaces (e.g., em0, re0, wlan0).


๐Ÿ”น 2. Temporary IP Setup (CLI only, lost after reboot)

Example for interface em0 with static IP:

doas ifconfig em0 inet 103.104.206.129 netmask 255.255.255.254 up
doas route add default 103.104.206.128
  • 103.104.206.129 โ†’ public IP
  • 255.255.255.254 โ†’ subnet mask
  • 103.104.206.128 โ†’ gateway

Check with:

ifconfig em0
netstat -rn

๐Ÿ”น 3. DNS Setup

Edit /etc/resolv.conf if needed:

nameserver 103.104.204.246
nameserver 103.104.204.247

๐Ÿ”น 4. Test Ping

Test ping to Google DNS / Cloudflare:

ping 8.8.8.8
ping 1.1.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment