OPNsense Forum

English Forums => Virtual private networks => Topic started by: novel on November 22, 2024, 06:26:28 PM

Title: How to get IPv6 from Wireguard to OPNsense?
Post by: novel on November 22, 2024, 06:26:28 PM
Hi,


My ISP gives me ONLY IPv4. I paid a VPS then I installed Wireguard VPN on the VPS, then IPv4 and comes to OPNsense's WAN.  OPNsense run as Wireguard client. This setup works fine.

The problem is that I cannot get from VPS IPv6 IP to OPNsense's WAN. Wireguard server on the VPS works fine with IPv6, I tested on my linux laptop. I made a wireguard client on my linux laptop then I connected directly to VPS with IPv4 and IPv6.


So I would like to get directly from VPS to OPNsense's Wan then traffic goes to LAN . I read a lot of examples here but I didn't solve it.

VPS gives a IPv6 with /64 subnet but I can get one more with /64 subnet.
Title: Re: How to get IPv6 from Wireguard to OPNsense?
Post by: novel on November 23, 2024, 04:53:41 PM

I was wonder nobdy here know something for my question? I will try to make simpler. My setup is ISP --> Wireguard server on VPS --> Wireguard client on OPNsense wg0 --> WAN --> LAN


In the past I had IPv6 from ISP but IPV6 cannot pass from OPNsense. The problem is OPNsense.


Actually I would like to setup IPv6 on OPNsense?
Title: Re: How to get IPv6 from Wireguard to OPNsense?
Post by: RamSense on November 23, 2024, 09:36:35 PM
maybe this guides can help you getting started:
https://homenetworkguy.com/how-to/set-up-a-fully-functioning-home-network-using-opnsense/ (https://homenetworkguy.com/how-to/set-up-a-fully-functioning-home-network-using-opnsense/)
or ipv6 only: https://homenetworkguy.com/how-to/configure-ipv6-opnsense-with-isp-such-as-comcast-xfinity/ (https://homenetworkguy.com/how-to/configure-ipv6-opnsense-with-isp-such-as-comcast-xfinity/)

his tutorials have helpt me also in the beginning to get things started.
Title: Re: How to get IPv6 from Wireguard to OPNsense?
Post by: novel on November 24, 2024, 11:16:12 PM
Quote from: RamSense on November 23, 2024, 09:36:35 PM
maybe this guides can help you getting started:
https://homenetworkguy.com/how-to/set-up-a-fully-functioning-home-network-using-opnsense/ (https://homenetworkguy.com/how-to/set-up-a-fully-functioning-home-network-using-opnsense/)
or ipv6 only: https://homenetworkguy.com/how-to/configure-ipv6-opnsense-with-isp-such-as-comcast-xfinity/ (https://homenetworkguy.com/how-to/configure-ipv6-opnsense-with-isp-such-as-comcast-xfinity/)

his tutorials have helpt me also in the beginning to get things started.


I read all of them with no luck.
Title: Re: How to get IPv6 from Wireguard to OPNsense?
Post by: tiermutter on November 25, 2024, 07:23:04 AM
You cannot delegate a /64 to your LAN, though what you need is NAT for IPv6 using ULAs in LAN (and other interfaces if needed).

Please provide screenshots of you intefaces overview first.

Then you need to enable manual configuration for LAN interface, go to services/router advertisements and select assisted mode for LAN.
Next go to interfaces/virtual IPs and add ULA address for LAN interface, e.g. fd00:10:10:10::1/64.
Then go to firewall/NAT/outbound and select hybrid mode. Add a manual rule with interface = WG network, IP version = v6, source address = fd00:10:10::/64

Make sure your LAN clients gets v6 addresses via SLAAC, e.g. fd00:10:10:10:1234:abcd:a1b2:e3f6

I guess this should work, I only do so for my VPN client networks to give them v6 connectivity without delegeting GUAs (since this is not really static in my case).
Title: Re: How to get IPv6 from Wireguard to OPNsense?
Post by: novel on November 26, 2024, 08:30:37 PM
Quote from: tiermutter on November 25, 2024, 07:23:04 AM
You cannot delegate a /64 to your LAN, though what you need is NAT for IPv6 using ULAs in LAN (and other interfaces if needed).

Please provide screenshots of you intefaces overview first.

Then you need to enable manual configuration for LAN interface, go to services/router advertisements and select assisted mode for LAN.
Next go to interfaces/virtual IPs and add ULA address for LAN interface, e.g. fd00:10:10:10::1/64.
Then go to firewall/NAT/outbound and select hybrid mode. Add a manual rule with interface = WG network, IP version = v6, source address = fd00:10:10::/64

Make sure your LAN clients gets v6 addresses via SLAAC, e.g. fd00:10:10:10:1234:abcd:a1b2:e3f6

I guess this should work, I only do so for my VPN client networks to give them v6 connectivity without delegeting GUAs (since this is not really static in my case).

there isn't  services/router advertisements

my devices connects to user interface not Lan.
Title: Re: How to get IPv6 from Wireguard to OPNsense?
Post by: tiermutter on November 26, 2024, 08:36:54 PM
 
Quote from: tiermutter on November 25, 2024, 07:23:04 AM
you need to enable manual configuration for LAN interface,
Title: Re: How to get IPv6 from Wireguard to OPNsense?
Post by: tiermutter on November 26, 2024, 08:37:50 PM
The do it all for "User" interface ;)
Title: Re: How to get IPv6 from Wireguard to OPNsense?
Post by: novel on November 26, 2024, 08:43:03 PM
Quote from: tiermutter on November 26, 2024, 08:37:50 PM
The do it all for "User" interface ;)


I said there isn't manual configuration in services
Title: Re: How to get IPv6 from Wireguard to OPNsense?
Post by: tiermutter on November 26, 2024, 08:44:47 PM
It is in Interface config, not services...
Title: Re: How to get IPv6 from Wireguard to OPNsense?
Post by: novel on November 26, 2024, 08:46:57 PM
Quote from: tiermutter on November 26, 2024, 08:44:47 PM
It is in Interface config, not services...




I found it Now?
Router Advertisements  assisted?

not pinging

All devices gets ipv6 but actually not work
Title: Re: How to get IPv6 from Wireguard to OPNsense?
Post by: novel on November 29, 2024, 01:05:37 PM
Can anyone help??
Title: Re: How to get IPv6 from Wireguard to OPNsense?
Post by: tiermutter on November 29, 2024, 03:44:55 PM
Quote from: tiermutter on November 25, 2024, 07:23:04 AM
Then go to firewall/NAT/outbound and select hybrid mode. Add a manual rule with interface = WG network, IP version = v6, source address = fd00:10:10::/64

Done?
Title: Re: How to get IPv6 from Wireguard to OPNsense?
Post by: novel on November 30, 2024, 10:59:15 AM
Quote from: tiermutter on November 29, 2024, 03:44:55 PM
Quote from: tiermutter on November 25, 2024, 07:23:04 AM
Then go to firewall/NAT/outbound and select hybrid mode. Add a manual rule with interface = WG network, IP version = v6, source address = fd00:10:10::/64

Done?

Yes! I have been attached pictures. Vpn interfaces is wg0
Title: Re: How to get IPv6 from Wireguard to OPNsense?
Post by: novel on December 05, 2024, 06:54:31 PM
Is anybody here to help me?


I've attached routes from my opnsense
Title: Re: How to get IPv6 from Wireguard to OPNsense?
Post by: novel on January 06, 2025, 10:17:34 AM
Bump