Score:0

Forward Wireguard traffic to ETH1

gw flag

Forward Wireguard traffic to ETH1

I setup a wireguard server with AWS, setup the wireguard client with a raspberry PI. Now I need to redirect the WG traffic (wg0) to eth1 -- my goal is to get a IP from my WG server when a client is connected to the PI eth1 (Full tunnel) my WG config

[Interface]
Address = 10.1.1.1/24
ListenPort = 51820
PrivateKey = ##
PostUp = iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE

[Peer]
PublicKey = ##
AllowedIPs = 10.1.1.2/32

I installed Netplan but I'm very lost with the config (I need to sent WG0 traffic to ETH1) does the follow config make sense : (probably not...)

network:
    version: 2
    renderer: networkd
    bonds:
        bond0:
            dhcp4: yes
            interfaces:
                - wg0
                - eth1
            parameters:
                primary: wg0

It's would be even better for the Raspberry PI to joint my UniFi VLAN (uplink) and get an IP from there but still sent/receive all the traffic from WG server but that's to complex for me I guess UPDATE: should I add the WG config to Netplan?

tunnels:
  wg0:
    mode: wireguard
    addresses: 10.1.1.1/24
    peers:
      - keys:
         Public_key?
        ...
    key: Private_key?
network:
    version: 2
    renderer: networkd
    bonds:
        bond0:
            dhcp4: yes
            interfaces:
                - wg0
                - eth1
            parameters:
                primary: wg0
 
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.