dd-wrtでOpenVPN (7)
テスト
UbuntuのGUIでOpenVPNをONにするとつながった。
クライアント側
$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 0.0.0.0 0.0.0.0 U 50 0 0 tun0
0.0.0.0 192.168.129.254 0.0.0.0 UG 100 0 0 ens33
10.10.1.0 0.0.0.0 255.255.255.0 U 50 0 0 tun0
10.147.19.0 0.0.0.0 255.255.255.0 U 0 0 0 zt7nnolz6z
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 ens33
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0
192.168.129.0 0.0.0.0 255.255.255.0 U 100 0 0 ens33
$ ifconfig tun0
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.10.1.2 P-t-P:10.10.1.2 Mask:255.255.255.0
inet6 addr: fe80::61da:e5df:63a4:eb17/64 Scope:Link
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:781 errors:0 dropped:0 overruns:0 frame:0
TX packets:815 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:682887 (682.8 KB) TX bytes:56848 (56.8 KB)
$ ping 10.10.1.1
PING 10.10.1.1 (10.10.1.1) 56(84) bytes of data.
64 bytes from 10.10.1.1: icmp_seq=1 ttl=64 time=5.56 ms
64 bytes from 10.10.1.1: icmp_seq=2 ttl=64 time=4.60 ms
64 bytes from 10.10.1.1: icmp_seq=3 ttl=64 time=2.87 ms
^C
--- 10.10.1.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2004ms
rtt min/avg/max/mdev = 2.879/4.348/5.562/1.111 ms
root@DD-WRT:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.129.254 0.0.0.0 UG 0 0 0 eth2
10.10.1.0 0.0.0.0 255.255.255.0 U 0 0 0 tun2
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
192.168.129.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
192.168.131.0 0.0.0.0 255.255.255.0 U 0 0 0 br0
root@DD-WRT:~# ifconfig tun2
tun2 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.10.1.1 P-t-P:10.10.1.1 Mask:255.255.255.0
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:743 errors:0 dropped:0 overruns:0 frame:0
TX packets:749 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:52757 (51.5 KiB) TX bytes:680260 (664.3 KiB)
PING 10.10.1.2 (10.10.1.2): 56 data bytes
64 bytes from 10.10.1.2: seq=0 ttl=64 time=1.924 ms
64 bytes from 10.10.1.2: seq=1 ttl=64 time=3.034 ms
^C
--- 10.10.1.2 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 1.924/2.479/3.034 ms
これで完成と喜んではいけない。テストしていくとまだ不具合がある。
(つづく)