======VPN====== =====Softether VPN===== http://www.majishini.net/wp/?p=833 # wget (softethaerのサーバ版、ARM EABI 32bit) #make # mkdir /usr/local/app # mv vpnserver softether # mv softether /usr/local/app # cd /usr/local/app/softether # chmod 600 * # chmod u+x vpn* #vi /etc/init.d/vpnserver #! /bin/sh ### BEGIN INIT INFO # Provides: vpnserver # Required-Start: $local_fs $network # Required-Stop: $local_fs $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: SoftEther VPN 2.0 # Description: Start SoftEther VPN service. ### END INIT INFO DAEMON=/usr/local/app/softether/vpnserver [ -x "$DAEMON" ] || exit 0 case "$1" in start) $DAEMON start # sleep 10 # tapdev=`/sbin/ip tuntap | awk -F ":" '{print $1}'` # /#sbin/brctl addif br0 $tapdev ;; stop) $DAEMON stop ;; esac # chmod +x /etc/init.d/vpnserver # update-rc.d vpnserver defaults ethervpnを使う場合は次のようにnetwork設定を変更する。 # vi/etc/network/interfaces ---- auto lo iface lo inet loopback iface eth1 inet static address 10.137.42.254 netmask 255.255.252.0 gateway 10.137.40.1 iface eth0 inet static address 192.168.1.7 netmask 255.255.255.0 #gateway 192.168.1.1 # auto wlan0 #iface wlan0 inet static #address 192.168.12.1 #netmask 255.255.255.0 #gateway 192.168.12.1 #iface default inet dhcp #gateway 192.168.1.1 #これを使うとVPN動かない、これをenableにするとlocal経由でinetに繋 がらない さらにethervpnでopenvpnを使う場合は次のよう設定する。 ・Ethervpnの設定 1) openvpnをenableにする http://yukimi0721.hatenablog.com/entry/20130630/1372562289 ( 2) DHCPのためにsecurenatをenableにする)->しない ・iptablesの変更 # vi /etc/network/if-pre-up.d/iptables # openvpn iptables -A INPUT -p tcp --dport 1194 -j IPSEC iptables -A INPUT -p udp --dport 1194 -j IPSEC