如何在 FreeBsd 11 中正确设置端口转发?

如何在 FreeBsd 11 中正确设置端口转发?

我在安装了 openVPN 的服务器上有 freebsd 11,我需要正确设置 VPN 以使流量通过它。通过 VPN 与服务器建立连接后,我无法再连接到互联网。问题是端口转发,我想通过 进行设置/etc/pf.conf

这是我所拥有的:

sysctl net.inet.ip.forwarding  #=> net.inet.ip.forwarding: 1

$ cat /etc/rc.conf
ifconfig_vtnet0="dhcp"
openvpn_enable="YES"
openvpn_if="tun"
gateway_enable="YES"

以及服务器的 openVPN 配置:

push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 208.67.222.222"
push "dhcp-option DNS 208.67.220.220"

然而,我在服务器日志中观察到的错误是:

MULTI: bad source address from client [x.x.x.x], packet dropped

我忘记了什么?

相关内容