Re:How to steal a developer's local database
by JonathonW on Thursday September 01, 2016 @05:01PM
(#12408851)
On OSX (and, I suspect, vanilla FreeBSD), this looks like (replacing 127.1.2.3 with the address you want to use; 0xff000000 must stay the same, since netmasks of all addresses on an interface must not confict if they're on the same subnet):
And then, when you're done:
to tear it back down.
[ Parent
| on HN ]
Re:How to steal a developer's local database
by X-Istence on Thursday September 01, 2016 @08:00PM
(#12409757)
Recommendation for aliases on an interface is to use 255.255.255.255 as the netmask on FreeBSD.
For example to add extra interfaces to lo0 on FreeBSD you may use:
ipv4_addrs_lo0="127.0.0.2-5/8"
in rc.confAnd now those addresses are automatically assigned to lo0, the netmask will be set to 255.255.255.255 automatically for all but the first in that range (.2). Since 127.0.0.1 is unconditionally assigned to lo0, you could also use:
ipv4_addrs_lo0="127.0.0.2-5/32"
This is what I do on FreeBSD.
Re:How to steal a developer's local database
by JonathonW on Friday September 02, 2016 @02:43AM
(#12411322)
The ifconfig man page just says the netmask must be "non-conflicting" if on the same subnet as the first network address for the interface (that'd be 127.0.0.1/8 for lo0). I'm presuming the narrower netmask qualifies as non-conflicting?
Re:How to steal a developer's local database
by X-Istence on Sunday September 04, 2016 @12:13AM
(#12422649)
Yes indeed!
Re:How to steal a developer's local database
by inferiorhuman on Thursday September 01, 2016 @05:29PM
(#12409043)
On FreeBSD at least you can assign whatever address you want to a loopback interface. I'm currently using aliases on a loopback device (lo1 in this case) for host <-> jail communication. The jails get 172.16.0.0/16.
You can manage this trivially in rc.conf and then restart the netif and route services.