Skip to content

Instantly share code, notes, and snippets.

@alvarow
Created September 19, 2016 01:58
Show Gist options
  • Save alvarow/334f175ba002f081120f643a9ce4c989 to your computer and use it in GitHub Desktop.
Save alvarow/334f175ba002f081120f643a9ce4c989 to your computer and use it in GitHub Desktop.
How to add an extra loopback IP address on your MacOS
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!-- copy to /Library/LaunchDaemons/extra.loopback.alias.plist -->
<plist version="1.0">
<dict>
<key>Label</key>
<string>Loopback Alias</string>
<key>ProgramArguments</key>
<array>
<string>/sbin/ifconfig</string>
<string>lo0</string>
<string>alias</string>
<string>127.0.0.3</string>
<string>netmask</string>
<string>255.255.255.0</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
@alvarow
Copy link
Author

alvarow commented Sep 19, 2016

Copy to

/Library/LaunchDaemons/extra.loopback.alias.plist

and reboot or load it with launchctl load /Library/LaunchDaemons/extra.loopback.alias.plist

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