/etc/network/interfacesはこんな具合で.
# The loopback network interface
auto lo
iface lo inet loopback
allow-hotplug eth0
auto eth0
iface eth0 inet static
# The primary network interface
auto br0
iface br0 inet static
address 192.168.100.100
netmask 255.255.255.0
network 192.168.100.0
broadcast 192.168.100.255
gateway 192.168.100.254
bridge_ports eth0 tap0
pre-up /usr/sbin/openvpn --mktun --dev tap0
pre-up /sbin/ifconfig tap0 0.0.0.0 promisc up
pre-up /sbin/ifconfig eth0 0.0.0.0 promisc up
pre-up /usr/sbin/brctl addbr br0
pre-up /usr/sbin/brctl addif br0 eth0
pre-up /usr/sbin/brctl addif br0 tap0
post-down /usr/sbin/brctl delif br0 tap0
post-down /usr/sbin/brctl delbr br0
post-down /usr/sbin/openvpn --rmtun --dev tap0
post-down -sbin/ifconfig eth0 down
フォワードの設定もする.
/etc/sysctl.conf
# Uncomment the next line to enable packet forwarding for IPv4
net.ipv4.ip_forward=1
# Uncomment the next line to enable packet forwarding for IPv6
net.ipv6.ip_forward=1
これがブリッジ設定の肝だった。
と言うより全部?
openvpnは入れておいて、認証関係をしっかりやるだけ.
むしろルーターたちの設定を自由にコントロールする&ファイアーウォール設定の方がややこしい.

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です