loopback in jail

Andrei Kolu antik at bsd.ee
Thu Nov 11 21:29:42 UTC 2010


2010/11/11 Freddy DISSAUX <freddy.dsx at free.fr>:
> Le Thu, Nov 11, 2010 at 12:15:09PM +0200, Andrei Kolu wrote:
>> OK, I tried this way:
>>
>> ezjail config:
>> export jail_crashtest_ip="194.xxx.yyy.22,127.0.0.1"
>>
>> I have loopback ip address now:
>> lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
>>         options=3<RXCSUM,TXCSUM>
>>         inet 127.0.0.1 netmask 0xff000000
>>
>> But, can't bind anything to 127.0.0.1 anyway. Is this a bug or something?
>
> Hum, i don't understand. You *must* have a lo0 with 127.0.0.1 ?
> lo0 with 127.0.0.x is not good for you (or your app) ?
>
> Regards,
>

OK, I figured it out- only problem was that operating system become
unresponsive for couple of minutes after I changed ip addres for jail
localhost, I thought that system crashed, but wow.

export jail_crashtest_ip="194.xxx.yyy.22,lo0|127.0.0.2"

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=3<RXCSUM,TXCSUM>
        inet 127.0.0.2 netmask 0xffffffff

Now:
# sockstat -4
vscan    perl       98672 5  tcp4   127.0.0.2:10024       *:*


Should I change /etc/hosts file too?

127.0.0.2               localhost localhost.my.domain

First I thought that 127.0.0.1 address is locally significant but
looks like I was wrong.


More information about the freebsd-jail mailing list