Multiple Subnets/interfaces

Daniel Faulknor danieljfaulknor at gmail.com
Wed Nov 24 03:28:25 UTC 2010


Hi,

I have a FreeBSD server with two interfaces, both on different physical networks. I want to have some jails on each network. 

# This file now contains just the overrides from /etc/defaults/rc.conf.
hostname="fs1.akl1.generatornz.com"
ifconfig_bce0="inet 120.xxx.52.2/28"
ifconfig_bce0_alias0="inet 120.xxx.52.3/32"
ifconfig_bce0_alias1="inet 120.xxx.52.4/32"
ifconfig_bce0_alias2="inet 120.xxx.52.6/32"
ifconfig_bce1="inet 120.xxx.55.146/25"
ifconfig_bce1_alias0="inet 120.xxx.55.147/25"
defaultrouter="120.xxx.52.1"

I have added this to my pf:

pass out route-to ($ext_if 120.xxx.55.129) from 120.xxx.55.147 to ! 120.xxx.55.128/23

I can ping 120.xxx.55.147, but i can't connect to any services that netstat is showing that is running:

Active Internet connections (including servers)
Proto Recv-Q Send-Q  Local Address          Foreign Address       (state)
tcp4       0      0 ip-120-136-55-14.ssh   *.*                    LISTEN
tcp4       0      0 ip-120-136-55-14.http  *.*                    LISTEN
tcp4       0      0 ip-120-136-55-14.9000  *.*                    LISTEN

Can anyone give me any tips?

Cheers
Daniel


More information about the freebsd-jail mailing list