小编moo*_*oon的帖子

将特定子网路由到 VPN 隧道

我的网络看起来像这样:

在此处输入图片说明

我正在尝试配置我的路由器,以便子网 (192.168.2.0/24) 通过网关/路由器上的 VPN 隧道 (tun0) 进行路由。

同时,子网 (192.168.1.0/24) 上的客户端直接通过 ppp0 路由出去,即不通过 VPN。

我不想运行 VPN 软件客户端,网络上的某些客户端需要直接访问。例如 Windows 游戏计算机、voip 电话等。

我的路由器还运行一个未绑定的 DNS 服务器,它将 DNS 查找转发到 dnscrypt-proxy。

路由器上的网络接口配置如下:

auto lo
    iface lo inet loopback

auto lo:1
iface lo:1 inet static
    address 127.0.0.2
    netmask 255.0.0.0

auto eth0
iface eth0 inet static
    address 192.168.1.1
    netmask 255.255.255.0

# Virtual interface
auto eth0:2
iface eth0:2 inet static
    address 192.168.2.1
    netmask 255.255.255.0

auto eth1
iface eth1 inet static
    address 192.168.0.2
    netmask 255.255.255.252

auto ppp0
iface ppp0 …
Run Code Online (Sandbox Code Playgroud)

networking router vpn routing openvpn

6
推荐指数
1
解决办法
1万
查看次数

标签 统计

networking ×1

openvpn ×1

router ×1

routing ×1

vpn ×1