macos community v1.0.0

networksetup

Configure network settings in System Preferences.

📋 Live Preview
networksetup
networksetup

Sandbox: execFile · Timeout: 30s

Capabilities

discovery.enumerate
network.commandandcontrol

Examples

network device enumeration: Use networksetup to display services with corresponding port and device in order they are tried for connecting to a network.

networksetup -listnetworkserviceorder

Detect connected network hardware: Use networksetup to detect new network hardware and create a default network service on the hardware.

networksetup -detectnewhardware

network device enumeration: Use networksetup to list all network interfaces, providing name, device name, MAC address.

networksetup -listallhardwareports

network device enumeration: Use networksetup to list all network interface names.

networksetup -listallnetworkservices

DNS server enumeration: Use networksetup to get configured DNS servers for a specific interface.

networksetup -getdnsservers Wi-Fi

Enumerate configured web proxy URL for an interface: Displays web proxy auto-configuration information for the specified interface.

networksetup -getautoproxyurl "Thunderbolt Ethernet"

Enumerate configured web proxy for an interface: Displays standard web proxy information for the specified interface.

networksetup -getwebproxy "Wi-Fi"

Set the https web proxy for an interface: Use networksetup to set the https web proxy for an interface.

networksetup -setsecurewebproxy "Wi-Fi" 46.226.108.171

Set the http web proxy for an interface: Use networksetup to set the http web proxy for an interface.

networksetup -setwebproxy "Wi-Fi" 46.226.108.171

Set auto proxy URL for an interface: Use networksetup to set the proxy URL for an interface.

networksetup -setautoproxyurl "Wi-Fi" $autoProxyURL

Enable auto proxy state: Use networksetup to enable the proxy auto-config

networksetup -setautoproxystate "Wi-Fi" on

Detection

TypeRule / Indicator
other No detections at time of publishing

Documentation

networksetup is an extensive tool for reading and setting various network configuration details useful for Discovery and Command and Control.

References