I'm new to all this so do excuse me if this is an obvious fix, anyhow. i have a freebsd server wtih 2 jails on it:
[code
JID IP Address Hostname Path
1 10.80.0.3 web.com /usr/jail/web
2 10.80.0.2 dev.com /usr/jail/dev
[/code]
and I have a bridge set up to provide them with a network connection:
so, I have apache24 one the jails, but have just realised that they cannot communicate with outside networks, so I am unable to access the webpage, I'll share some of my config files, so hopefully that'll help.
this is the hosts rc.conf:
this is the hosts pf.conf:
hosts jail.conf:
any help is much appreciated. let me know if you want to see any other files or anything like that
[code
JID IP Address Hostname Path
1 10.80.0.3 web.com /usr/jail/web
2 10.80.0.2 dev.com /usr/jail/dev
[/code]
and I have a bridge set up to provide them with a network connection:
Code:
vtnet0: flags=8863<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=4c07bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWTSO,LINKSTATE,TXCSUM_IPV6>
ether de:fe:a1:b9:0c:c3
inet 10.1.0.134 netmask 0xffffff00 broadcast 10.1.0.255
media: Ethernet autoselect (10Gbase-T <full-duplex>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
inet 127.0.0.1 netmask 0xff000000
groups: lo
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 58:9c:fc:00:56:26
inet 10.80.0.1 netmask 0xffffff00 broadcast 10.80.0.255
inet 10.80.0.3 netmask 0xffffffff broadcast 10.80.0.3
inet 10.80.0.2 netmask 0xffffffff broadcast 10.80.0.2
id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
groups: bridge
nd6 options=9<PERFORMNUD,IFDISABLED>
lo1: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
inet 10.80.0.2 netmask 0xffffff00
inet 10.80.0.3 netmask 0xffffff00
inet6 fe80::1%lo1 prefixlen 64 scopeid 0x4
groups: lo
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
so, I have apache24 one the jails, but have just realised that they cannot communicate with outside networks, so I am unable to access the webpage, I'll share some of my config files, so hopefully that'll help.
this is the hosts rc.conf:
Code:
ifconfig_vtnet0="inet 10.1.0.134 netmask 255.255.255.0"
defaultrouter="10.1.0.250"
sshd_enable="YES"
dumpdev="AUTO"
zfs_enable="YES"
jail_enable="YES"
pf_enable="YES"
gateway_enable="YES"
apache24_enable="YES"
cloned_interfaces="bridge0 lo1"
ifconfig_bridge0="inet 10.80.0.1 netmask 255.255.255.0"
ipv4_addrs_lo1=" 10.80.0.2/24 10.80.0.3/24" iocage_enable="YES"
this is the hosts pf.conf:
Code:
ext_if = "vtnet0"
bridge_if = "bridge0"
nat on $ext_if from $bridge_if:network to any -> ($ext_if)
rdr pass on $ext_if proto tcp from any to $ext_if port 2223 -> 10.80.0.2 port 2223 #dev
rdr pass on $ext_if proto tcp from any to $ext_if port 2224 -> 10.80.0.3 port 2224 #web
pass on $bridge_if all
hosts jail.conf:
Code:
#devfs_ruleset = "2";
mount.devfs;
exec.start = "/bin/sh /etc/rc";
exec.stop = "/bin/sh /etc/rc.shutdown jail";
allow.raw_sockets = "1";
dev {
host.hostname = "dev.com";
ip4.addr = "10.80.0.2";
path = "/usr/jail/dev";
interface = "bridge0"; }
web {
host.hostname = "web.com";
ip4.addr = "10.80.0.3";
path = "/usr/jail/web";
interface = "bridge0"; }
any help is much appreciated. let me know if you want to see any other files or anything like that