Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Wireguard client on Ubuntu server / NAT client into Tunnel without running server traffic into it
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Wireguard client on Ubuntu server / NAT client into Tunnel without running server traffic into it

dnwkdnwk Member

I am trying to run a wireguard client on my ubuntu server. I want to NAT some client traffic into the wireguard tunnel without the tunnel taking over all server traffic. Essentially, I want this wireguard tunnel to function like a GRE tunnel where I can use iptables to control what goes into wireguard. I can't seem to find a way of doing that. Any configuration recommendations?

Comments

  • add AllowedIPs to your conf file

  • dnwkdnwk Member

    When I AllowedIPs = 0.0.0.0/0, it will take over the entire outgoing traffic of the server. I want to route by source IP. Not route by destination as in the AllowedIPs in wireguard configuration

  • NeoonNeoon Community Contributor, Veteran
    edited March 2023

    Try Table = off or adjust AllowedIPs

  • dnwkdnwk Member

    @Neoon said:
    Try Table = off or adjust AllowedIPs

    How do I do table = off? I want AllowedIPs to route 0.0.0.0/0 so that when I do SNAT, the destination can be any

  • NeoonNeoon Community Contributor, Veteran

    @dnwk said:

    @Neoon said:
    Try Table = off or adjust AllowedIPs

    How do I do table = off? I want AllowedIPs to route 0.0.0.0/0 so that when I do SNAT, the destination can be any

    You add that to your wg-quick config file.

    Thanked by 1dnwk
  • dnwkdnwk Member

    @Neoon said:

    @dnwk said:

    @Neoon said:
    Try Table = off or adjust AllowedIPs

    How do I do table = off? I want AllowedIPs to route 0.0.0.0/0 so that when I do SNAT, the destination can be any

    You add that to your wg-quick config file.

    Thanks. It works!!!

Sign In or Register to comment.