AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-957557

Kevin's questions

Martin Hope
Kevin
Asked: 2022-03-06 13:46:39 +0800 CST

向 eth1 发送 WG 流量

  • 0

我用 AWS 设置了一个wireguard 服务器,用一个树莓派设置了wireguard 客户端。

现在我需要将 WG 流量 (wg0) 重定向到 eth1(eth0 是我的交换机的上行链路)

-- 我的目标是在客户端连接到 PI eth1(全隧道)时从我的 WG 服务器获取 IP

我的 WG 配置

[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

我安装了 Netplan,但我对配置很迷茫(我需要将 WG0 流量发送到 ETH1)

以下配置是否有意义:(可能不是......)

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

更新:我应该将 WG 配置添加到 Netplan 吗?

tunnels:
network:
    version: 2
    renderer: networkd
    bonds:
        bond0:
            dhcp4: yes
            interfaces:
                - wg0
                - eth1
            parameters:
                primary: wg0
  wg0:
    mode: wireguard
    addresses: 10.1.1.1/24
    peers:
      - keys:
         Public_key?
        ...
    key: Private_key?
vpn networking wireguard netplan
  • 1 个回答
  • 116 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve