Hello
I am currently learning how to use FreeBSD to host some basic services in Jails
I am trying to configure networking with jails. I noticed that if I try to connect from a jail to a web server installed on the host, the connection is blocked even if the firewall is disabled.
It is a setup I wish for, but I do not know how it work.
I was not able to find in man pages if this a normal behavior or not.
Can someone respond that question to me or tell me where can I find this information ?
Thanks.
Host /etc/rc.conf:
/etc/jail.conf
Jail /etc/rc.conf
I am currently learning how to use FreeBSD to host some basic services in Jails
I am trying to configure networking with jails. I noticed that if I try to connect from a jail to a web server installed on the host, the connection is blocked even if the firewall is disabled.
It is a setup I wish for, but I do not know how it work.
I was not able to find in man pages if this a normal behavior or not.
Can someone respond that question to me or tell me where can I find this information ?
Thanks.
Host /etc/rc.conf:
Code:
hostname="test-freebsd-zfs"
keymap="fr.acc.kbd"
ifconfig_vtnet0="inet 192.168.122.2 netmask 255.255.255.0"
defaultrouter="192.168.122.1"
cloned_interfaces="bridge0"
ifconfig_bridge0="addm vtnet0"
sshd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
zfs_enable="YES"
sendmail_enable="NO"
jail_enable="YES"
apache24_enable="yes"
pf_enable="yes"
pflog_enable="yes"
/etc/jail.conf
Code:
exec.clean;
exec.start = "/bin/sh /etc/rc";
exec.stop = "/bin/sh /etc/rc.shutdown";
mount.devfs;
allow.raw_sockets;
vnet;
testjail {
host.hostname = testjail.lan;
path = "/storage/jails/testjail";
devfs_ruleset = "5";
vnet.interface = "epair0b";
exec.prestart = "ifconfig epair0 create up";
exec.prestart += "ifconfig bridge0 addm epair0a";
exec.poststop = "ifconfig bridge0 deletem epair0a";
exec.poststop += "ifconfig epair0a destroy";
}
Jail /etc/rc.conf
Code:
ifconfig_epair0b="inet 192.168.122.10/24"
defaultrouter="192.168.122.1"
nginx_enable="YES"