Re: Howto: ipsec tunnel routing both IPv4 and IPv6? Possible?

From: Andrey V. Elsukov <bu7cher_at_yandex.ru>
Date: Mon, 15 Jan 2024 13:32:13 UTC
On 15.01.2024 16:09, Michael Grimm wrote:
> Hi,
> 
> I do use an ipsec tunnel for routing local IPv4 traffic for years now (/etc/rc.conf):
> 
>       cloned_interfaces="ipsec0"
>       static_routes="tunnel0"
>       create_args_ipsec0="reqid 104"
>       ifconfig_ipsec0="inet 10.2.2.250 10.1.1.254 tunnel 1.2.3.4 10.20.30.40"
>       route_tunnel0="10.1.1.0/24 10.1.1.254"
> 
> ifconfig ipsec0 (erelevant info, only):
>       ipsec0: flags=1008051<UP,POINTOPOINT,RUNNING,MULTICAST,LOWER_UP> metric 0 mtu 1400
>       tunnel inet 1.2.3.4 --> 10.20.30.40
>       inet 10.2.2.250 --> 10.1.1.254 netmask 0xffffff00
>       reqid: 104
> 
> 
> pf firewall entries are set to allow esp over that tunnel.
> 
> Now, I do want to route local IPv6 in addition, *if* that is possible, at all.

Hi,

try something like this:

	ifconfig_ipsec0_ipv6="inet6 fd00:b:b:b::250 fd00:a:a:a::254 prefixlen 128"

-- 
WBR, Andrey V. Elsukov