Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

SetStaticIP

Small helper script for macOS to switch a chosen network service to a static IPv4 plus custom DNS servers.

What it does

  1. Lists all network services (Wi-Fi, Ethernet, Docking Station, etc.).
  2. Lets you pick one by number.
  3. Applies the static IP, subnet mask, router (gateway), and DNS servers you configured at the top of the script.

Prerequisites

  • macOS (uses networksetup)
  • Bash
  • An IP address that fits the subnet you set

Configure first

Open set-manual-ip-dns.sh and adjust:

SUBNET="255.255.255.0"
GATEWAY="192.168.1.1"

DNS1="1.1.1.1"
DNS2="8.8.8.8"

Make sure the IP you plan to use is in the same network as the gateway.

Usage

chmod +x set-manual-ip-dns.sh
./set-manual-ip-dns.sh 192.168.1.100

Then pick the service (e.g. Wi-Fi) and confirm with y.

The script shows the new settings afterwards.

Notes

  • Basic IPv4 format check only (no deeper validation).
  • You need sudo to apply changes.
  • If DNS fails but IP succeeds (or vice versa) the script will tell you.

Disclaimer

Use at your own risk. Double‑check the IP before applying so you do not collide with another device.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages