我在Debian / kFreeBSD上遇到了桥接networking接口的问题。
我的主要目标是创build2-4个分接口,并用两个物理接口来连接它们。
/ etc / network / interfaces中的语法与Linux版本有点不同。
目前我使用以下(在Linux Debian上)
(只有部分输出)
auto tap0 iface tap0 inet manual pre-up openvpn --mktun --dev tap0 post-down openvpn --rmtun --dev tap0 auto tap1 iface tap1 inet manual pre-up openvpn --mktun --dev tap1 post-down openvpn --rmtun --dev tap1 auto br0 iface br0 inet static bridge_ports tap0 tap1 eth1 eth2 address 10.20.30.40 netmask 255.255.255.0
什么是正常的解决scheme,FreeBSD上的als openvpn只创build设备,如果一个用户连接?
我缺less像/etc/rc.conf之类的东西
cloned_interfaces="bridge0" ifconfig_bridge0="addm re0 up" openvpn_if="tap bridge"
我的一般目标是从Debian Linux切换到Debian kFreeBSD,但是我需要先解决一些问题。
(我的改变的原因是PF(女巫我比iptables更容易使用)和本地ZFS),但是,你可以从其他方法说服(BIG FS需要,并且btrfs不够稳定)
Debian / kFreeBSDnetworking组件是FreeBSD的内核特性,所以遵循FreeBSD的方式。
要在FreeBSD上创build隧道接口,只需使用:
ifconfig tun0 create ifconfig tun0 tunnel <source IP> <destination IP> ifconfig tun0 up
你可能会添加一些路线说明,以使用这个隧道。
但你似乎使用OpenVPN。 我不知道OpenVPNconfiguration是否能够为你设置这个tun0接口,就像FreeBSD上的情况一样。 在FreeBSD服务器上,我的一个OpenVPNconfiguration包含以下指令:
# Run in point to point mode mode p2p # Other endpoint remote <the remote ip or host> local <your ip> # Network config dev-type tun dev tun0 ifconfig <my local 10.x address> <the remote 10.x local adress>
对于某些高级隧道configuration,如IPv4-> IPv6隧道,有一个更高级的驱动程序,称为gif0。 这里是一个例子:
ifconfig gif0 create ifconfig gif0 tunnel <your server> <the destination server ipv4> ifconfig gif0 inet6 <the main ipv6 address> route -n add -inet6 default <the ipv6 routing address> ifconfig gif0 up