Jailed process listening to broadcast address of host system - possible?

Fbsd8 fbsd8 at a1poweruser.com
Wed Mar 6 01:03:37 UTC 2013


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 at host # nc -l 192.168.2.255 9999
>     <Listening for connections, ok>
> 
>     root at 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 at 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 at 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?





More information about the freebsd-questions mailing list