Permanently create an ifconfig loopback alias — macOS

sudo ifconfig lo0 alias someIp
sudo vi /Library/LaunchDaemons/org.my.ifconfig.plist<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.my.ifconfig</string>
<key>RunAtLoad</key>
<true/>
<key>ProgramArguments</key>
<array>
<string>/sbin/ifconfig</string>
<string>lo0</string>
<string>alias</string>
<string>YourIpHere</string>
</array>
</dict>
</plist>

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
David limkys

David limkys

More from Medium

What is a .pro.user File

Gitlab Runner “Exited with status 1” Without any Log

SharePoint Framework Development on a $99 Raspberry PI

Security Automation With GitHub Actions Locally (with nektos/act)