Hello,
I have some jails on my FreeBSD host. They have IPv4 addresses on a cloned interface lo2 I created. None of the jails has an ip address on the external interface of the host. They only use the cloned interface lo2 and I configured my pf firewall so that the host acts as a router and does NAT so that the jails can access the internet.
This is working, but now I'd like the jails to be able to access the IPv6 internet. I'd like that the jails don't face the internet directly, so that the host can decide which port to open and/or redirect to each jail.
Unfortunately I don't know how IPv6 is supposed to be configured. For example, I don't know what kind of IPv6 address I can assign to the lo2 interface, or to my jails and how to do that so this network of jails remains local.
Could you help me achieve this? Any help or pointer in the right direction would be appreciated.
I add the /etc/jail.conf and the /etc/rc.conf of the host below.
/etc/jail.conf
/etc/rc.conf
I have some jails on my FreeBSD host. They have IPv4 addresses on a cloned interface lo2 I created. None of the jails has an ip address on the external interface of the host. They only use the cloned interface lo2 and I configured my pf firewall so that the host acts as a router and does NAT so that the jails can access the internet.
This is working, but now I'd like the jails to be able to access the IPv6 internet. I'd like that the jails don't face the internet directly, so that the host can decide which port to open and/or redirect to each jail.
Unfortunately I don't know how IPv6 is supposed to be configured. For example, I don't know what kind of IPv6 address I can assign to the lo2 interface, or to my jails and how to do that so this network of jails remains local.
Could you help me achieve this? Any help or pointer in the right direction would be appreciated.
I add the /etc/jail.conf and the /etc/rc.conf of the host below.
/etc/jail.conf
Code:
myjail {
host.hostname = myjail;
interface = lo2;
ip4.addr = 10.240.0.3;
}
myotherjail {
host.hostname = myotherjail;
interface = lo2;
ip4.addr = 10.240.0.4;
}
yetanotherjail {
host.hostname = yetanotherjail;
interface = lo2;
ip4.addr = 10.240.0.5;
}
/etc/rc.conf
Code:
zfs_enable="YES"
### Added by OVH - block start
# Network configuration (IPv4)
ifconfig_em0="inet 111.222.3.4 netmask 255.255.255.0 broadcast 111.222.3.255"
defaultrouter="111.222.3.254"
# Network configuration (IPv6)
ifconfig_em0_ipv6="inet6 2001:xxxx:xxxx:xxxx::1 prefixlen 128 accept_rtadv no_radr"
ipv6_network_interfaces="em0"
ipv6_default_interface="em0"
ipv6_defaultrouter="2001:xxxx:xxxx:xxxx:ff:ff:ff:ff"
ipv6_route_ovhgw="2001:xxxx:xxxx:xxxx:ff:ff:ff:ff -prefixlen 128 -interface em0"
ipv6_static_routes="ovhgw"
# Various options
dumpdev="AUTO"
clear_tmp_enable="YES"
accounting_enable="YES"
# Daemons
ntpd_enable="YES"
sshd_enable="YES"
local_unbound_enable="YES"
### Added by OVH - block end
hostname="xxxxxxxxxxxxxx.eu"
pf_enable="YES"
pflog_enable="YES"
pf_rules="/etc/pf.conf"
ip6addrctl_policy="ipv4_prefer"
cloned_interfaces="lo2"
ifconfig_lo2="inet 10.240.0.1 netmask 255.240.0.0"
jail_enable="YES"