Setting up a Static IP Tunnel on OPNsense/pfSense Print

  • 0

In order to set up Static IP Tunnels on OPNsense/pfSense, you will need:

  • A Static IP Tunnel
  • An OPNsense or pfSense router

We will show OPNsense, but pfSense should be similar.

First, log into the OPNsense by typing in https://192.168.1.1/ or your router's set IP address.

Subsequently, go to the left sidebar, and select Interfaces -> Devices -> Point-to-point.

OPNsense sidebar

In the Point-to-point section, click the + (Add) button:

OPNsense point-to-point section

In the add device section, enter the following:

  • Link Type: L2TP
  • Username: Your L2TP username
  • Password: Your L2TP password
  • Gateway: 23.124.76.2

Click on Save at the bottom of the page.

Subsequently, click on Assignments in the sidebar.

In the Assign a new interface section, select the newly-created L2TP interface in Device and click Add.

When the interface is created, go to OPT1 and tick Enable.

In IPv6 Configuration Type, select SLAAC:

Go to the bottom of the page and select Save.

Now, click on Apply Changes:

Enabling NAT

On OPNsense, if your L2TP VPN has an IPv4 address, NAT should be automatically configured.

Enabling IPv6

If you wish to have IPv6 (recommended), you will need to add your IPv6 address to the LAN interface.

To do so, in the sidebar, select Interfaces -> LAN:

Navigate down to Generic configuration. In IPv6 Configuration Type select Static IPv6:

Go down to Static IPv6 configuration. In the IPv6 address, enter in the IPv6 address from your prefix you want on your LAN:

Now click Save.

Click on Apply Changes:

Go to the sidebar. There, click on Services -> Router Advertisements -> LAN:

In Router Advertisements, select Assisted:

Navigate down to the bottom of the page and select Save.

Now, in the sidebar, go to System -> Gateways -> Configuration:

In the Edit Gateway dialog, select the following:

  • Name: OPT1_v6 (or any arbitrary name)
  • Interface: OPT1 (or your L2TP interface)
  • Address Family: IPv6

Be sure to make sure IPv6 is disabled on your WAN interface to prevent issues that arise, assuming you're not connecting via IPv6.

Now click on Apply:

Now, IPv6 should work with your L2TP tunnels.


Was this answer helpful?

« Back