ifconfig - how to setup automatically

Joined
Jun 8, 2007
Messages
20
Reaction score
0
Points
1
Your Mac's Specs
iMac 20, C2D 2.16 GHz, 3Gb, 250Gb
I'm using Mac for web development and I need few additional loopback IPs for my dev websites, so in terminal I used this:

sudo ifconfig lo0 alias 127.0.0.2 up
sudo ifconfig lo0 alias 127.0.0.3 up

and it worked great. Hovewer, after shutting down Mac and then starting it again, those loopback IPs were lost and I had to add them again.

Is there a way to automatically run these commands on Mac start, preferably without it asking for my password every time?

P.S. I'm new to Macs, I've been using it only for 4 days, so I have no clue about config files, startup files, etc...
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top