this post was submitted on 28 Jan 2025
13 points (84.2% liked)

Selfhosted

60543 readers
1060 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

Detailed Rules Post

  1. Be civil.

  2. No spam.

  3. Posts are to be related to self-hosting.

  4. Don't duplicate the full text of your blog or readme if you're providing a link.

  5. Submission headline should match the article title.

  6. No trolling.

  7. Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details.

  8. AI-related discussions and AI-involved promotional posts have additional requirements for tagging, as noted in Rule 7 and the AI & Promotional Post Expanded Rules post.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 3 years ago
MODERATORS
 

I feel like this might be a long shot but wanted to see if anyone else was running the tailscale plugin for Opnsense. I have everything set up when my opnsense acts as an exit node. The clients connect up to the exit node just fine but I wanted to redirect traffic to a different gateway instead of my ISP gateway. I tried setting up tailscale net as the source on the tailscale interface to route traffic to a specific gateway but it doesn't seem to work. It seems like tailscale ignores all of opnsense firewall rules which is a lot different than what I am use to working with the wireguard interface on opnsense.

top 2 comments
sorted by: hot top controversial new old

You need routing rules for this on the exit node. You can't use the default routes for the machine and expect a virtual device that is already being routed to know where to go.

You said you added the Tailscale network, but how wide did you go? By default when you load the plugin and activate the interface, it just gives its own IP as the network (/32). If you added that, then only traffic with that specific origin will hit your route. It's crazy, but for my firewall rules (not routing) to work, I had to define the network as a 100.0.0.0/8, which is gigantic. You may have to do that with the route as you can't otherwise set the gateway on the interface as it's not hosting the DHCP server.