dd-wrtでOpenVPN (6)
Services > VPNの設定でOpenVPNの設定を入れていく。
項目 | 値 |
---|---|
OpenVPN | Enable |
CVE-2019-14899 Mitigation | Enable |
Start Type | WAN Up |
Inbound Firewall on TUN | (no) |
Configure as | GUI(server) |
Server mode | Router(TUN) |
Network | 10.10.1.0 |
Netmask | 255.255.255.0 |
Port | 1194 |
Tunnel Protocol | udp |
Encryption Cipher | AES-256-CBC |
Has Algorithm | SHA256 |
First Data Cipher | AES-256-CBC |
Second Data Cipher | AES-256-CBC |
Third Data Cipher | AES-256-CBC |
Advanced Option | Disable |
Public Server Key | (server3.key) |
DH PEM | (dh2048.pem) |
Additional Config | |
TLS Key Choice | TLS Auth |
TLS Key | |
Certificate Revoke List |
クライアント側の設定(ubuntu)
参考:https://qiita.com/noraworld/items/05658055446c41482cce
$ sudo apt-get -y install network-manager-openvpn-gnome
GUIで設定できる。(設定> Network > (+) VPN)
項目 | 値 |
---|---|
Gateway | dd-wrtのIPアドレス |
Authentication Type | Certificates (TLS) |
User Certificate | client1.crt |
CA Certificate | ca.crt |
Private Key | client1.key |
Private Key Password |
項目 | 値 |
---|---|
Use LZO data compression | y |
Cipher | AES-256-CBC |
Cipher | AES-256-CBC |
Use custom size of cipher key | 256 |
HMAC Authentication | SHA-256 |
dd-wrtでOpenVPN (5)
dd-wrtでOpenVPN (4)
LANセグメントの追加拡張はMR3020でやったのですんなり
https://yellow.ap.teacup.com/applet/kentaro/202102/archive?b=5
...のはずだったが上流側からのpingが通らず、半日はまる。調べていくとClient Mode / Router Modeでは(勝手に)iptablesの設定が入って、WiFiインタフェース側からの接続が禁止されている。
Chain INPUT (policy ACCEPT 417 packets, 33609 bytes)
num pkts bytes target prot opt in out source destination
1 0 0 DROP tcp -- eth2 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:8080
2 0 0 DROP tcp -- eth2 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:80
3 0 0 DROP tcp -- eth2 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:443
4 0 0 DROP tcp -- eth2 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:69
5 0 0 DROP tcp -- eth2 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:22
6 0 0 DROP tcp -- eth2 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:23
Firewallコマンドで立ち上がり時に設定変更 (一応telnetだけは禁止しておく)
iptables -F INPUT
iptables -I INPUT 1 -d 192.168.129.0/24 -i eth2 -p tcp --dport 23 -j logdrop
その他のセキュリティとしてFORWRDチェインに追加する
(つづく)
dd-wrtでOpenVPN (3)
dd-wrtでOpenVPN (2)
HOME LANを拡張 (6)
HOME LANの拡張。
完成図
(この項終わり)