Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 05 Mar 2013 20:03:35 -0500
From:      Fbsd8 <fbsd8@a1poweruser.com>
To:        Matthias Petermann <matthias@d2ux.org>
Cc:        "questions@freebsd.org" <questions@freebsd.org>
Subject:   Re: Jailed process listening to broadcast address of host system - possible?
Message-ID:  <513695E7.8090201@a1poweruser.com>
In-Reply-To: <20130305184202.Horde.eDUXhBWXINRGxbZx4ZcRCQ2@d2ux.org>
References:  <20130305184202.Horde.eDUXhBWXINRGxbZx4ZcRCQ2@d2ux.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Matthias Petermann wrote:
> 
> Hello,
> 
> is there any way to listen to a networks broadcast adress from within a 
> Jail?
> 
> Given ist the following setup:
> 
>  * The host (IP 192.168.2.127)
>  * The jail (same IP as host, 192.168.2.127)
> 
> When I do:
> 
>  $ nc -l 192.168.2.255 9999
> 
> I got the following results:
> 
>     root@host # nc -l 192.168.2.255 9999
>     <Listening for connections, ok>
> 
>     root@jail # nc -l 192.168.2.255 9999
>     nc: Can't assign requested address
> 
> The latter is the problem. I already sat security.jail.allow_raw_sockets=1
> and now not sure if I am trying to do something which is not allowed by 
> design?
> 
> Thanks in advance,
> Matthias
> 
> 
> 
> # Additional Information:
> 
> ## ifconfig (host):
> 
> root@host # ifconfig -a
> em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
>         options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
>         ether 08:00:27:b3:64:f2
>         inet 192.168.2.127 netmask 0xffffff00 broadcast 192.168.2.255
>         nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
>         media: Ethernet autoselect (1000baseT <full-duplex>)
>         status: active
> lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
>         options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
>         inet6 ::1 prefixlen 128
>         inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
>         inet 127.0.0.1 netmask 0xff000000
>         inet 10.0.0.1 netmask 0xffffffff
>         inet 10.0.0.2 netmask 0xffffffff
>         inet 10.0.0.3 netmask 0xffffffff
>         inet 10.0.0.4 netmask 0xffffffff
>         inet 10.0.0.5 netmask 0xffffffff
>         nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
> pflog0: flags=141<UP,RUNNING,PROMISC> metric 0 mtu 33152
>         nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
> 
> ## ifconfig (jail):
> 
> root@jail # ifconfig -a
> em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
>         options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
>         ether 08:00:27:b3:64:f2
>         inet 192.168.2.127 netmask 0xffffff00 broadcast 192.168.2.255
>         media: Ethernet autoselect (1000baseT <full-duplex>)
>         status: active
> lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
>         options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
> pflog0: flags=141<UP,RUNNING,PROMISC> metric 0 mtu 33152
> 

Since your talking about a jail process, you really need to provide 
details on how you configured the jail and if your using the interface 
parameter?






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?513695E7.8090201>