Hi, I am using jails with vnet on FreeBSD 13.1-RELEASE
Host /etc/rc.conf looks like:
And then I have an /etc/jail.conf file that looks like:
And the /etc/rc.conf files of the two jails look like follows.
The /etc/rc.conf file of jail1 looks like
The /etc/rc.conf file of jail2 looks like
This gives me globally routable IPv6 for each of the jails. That is awesome and desirable.
Unfortunately, the vnet interfaces are using different MAC addresses and these virtual MAC addresses end up hitting the external network interface.
Because of this, my server hosting provider sent me an email complaining that I am source-MAC not permitted by them.
They have a resource page about the problem at https://docs.hetzner.com/robot/dedicated-server/faq/error-faq/#mac-errors
How can I achieve the same as above, giving my jails globally routable IPv6 addresses from the /64 subnet assigned to me, without sending packets with bad source-MAC?
Host /etc/rc.conf looks like:
Code:
hostname="de1"
ifconfig_em0_name="extif"
ifconfig_extif="DHCP"
ifconfig_extif_ipv6="inet6 2a01:xxxx:xxxx:xxxx::2 prefixlen 64"
ipv6_defaultrouter="fe80::1%extif"
ipv6_gateway_enable="YES"
cloned_interfaces="epair0 epair1 epair2 bridge0 bridge1"
ifconfig_epair0a_name="e0a_ext_jpub"
ifconfig_epair0b_name="e0b_ext_jpub"
ifconfig_epair1a_name="e1a_jail1"
ifconfig_epair1b_name="e1b_jail1"
ifconfig_epair2a_name="e2a_jail2"
ifconfig_epair2b_name="e2b_jail2"
ifconfig_bridge0_name="jbrext"
ifconfig_jbrext="addm extif addm e0a_ext_jpub"
ifconfig_bridge1_name="jbrpub"
ifconfig_jbrpub="addm e0b_ext_jpub addm e1a_jail1 addm e2a_jail2"
#ifconfig_jbrext_ipv6="inet6 2a01:xxxx:xxxx:xxxx::3 prefixlen 64"
ifconfig_e0a_ext_jpub_ipv6="inet6 2a01:xxxx:xxxx:xxxx::4 prefixlen 64"
ifconfig_e0b_ext_jpub_ipv6="inet6 2a01:xxxx:xxxx:xxxx::5 prefixlen 64"
#ifconfig_jbrpub_ipv6="inet6 2a01:xxxx:xxxx:xxxx::6 prefixlen 64"
ifconfig_e1a_jail1_ipv6="inet6 2a01:xxxx:xxxx:xxxx::7 prefixlen 64"
ifconfig_e2a_jail2_ipv6="inet6 2a01:xxxx:xxxx:xxxx::b prefixlen 64"
sshd_enable="YES"
ntpdate_enable="YES"
ntpd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
zfs_enable="YES"
jail_enable="YES"
And then I have an /etc/jail.conf file that looks like:
Code:
$j = "/jail";
path = "$j/$name";
exec.clean;
exec.start = "sh /etc/rc";
exec.stop = "sh /etc/rc.shutdown";
mount.devfs;
exec.prestart = "logger starting jail $name";
exec.poststart = "logger jail $name has started";
exec.prestop = "logger shutting down jail $name";
exec.poststop = "logger jail $name has shut down";
exec.consolelog = "/var/tmp/jail-consolelog-$name";
jail1 {
host.hostname = "jail1";
vnet;
vnet.interface = "e1b_jail1";
sysvsem = "new";
sysvmsg = "new";
sysvshm = "new";
}
ipv4-proxy {
host.hostname = "ipv4-proxy.example.com";
ip4 = inherit;
ip6 = inherit;
allow.raw_sockets = true;
}
jail2 {
host.hostname = "jail2";
vnet;
vnet.interface = "e2b_jail2";
}
And the /etc/rc.conf files of the two jails look like follows.
The /etc/rc.conf file of jail1 looks like
Code:
ipv6_defaultrouter="2a01:xxxx:xxxx:xxxx::4"
ifconfig_e1b_jail1_ipv6="inet6 2a01:xxxx:xxxx:xxxx::8 prefixlen 64"
postgresql_enable="YES"
redis_enable="YES"
nginx_enable="YES"
The /etc/rc.conf file of jail2 looks like
Code:
ipv6_defaultrouter="2a01:xxxx:xxxx:xxxx::4"
ifconfig_e2b_jail2_ipv6="inet6 2a01:xxxx:xxxx:xxxx::c prefixlen 64"
nginx_enable="YES"
This gives me globally routable IPv6 for each of the jails. That is awesome and desirable.
Unfortunately, the vnet interfaces are using different MAC addresses and these virtual MAC addresses end up hitting the external network interface.
Because of this, my server hosting provider sent me an email complaining that I am source-MAC not permitted by them.
They have a resource page about the problem at https://docs.hetzner.com/robot/dedicated-server/faq/error-faq/#mac-errors
How can I achieve the same as above, giving my jails globally routable IPv6 addresses from the /64 subnet assigned to me, without sending packets with bad source-MAC?