- vpn svr = centos
- phone = android
openvpn --genkey --secret static.key
sudo firewall-cmd --permanent --add-port=/udp
sudo firewall-cmd --permanent --add-masquerade
sudo firewall-cmd --reload
sudo vim /etc/sysctl.conf
- net.ipv4.ip_forward = 1
sudo /sbin/sysctl -p
ifconfig
port
proto udp
dev tun
secret </path/to/static.key>
user nobody
group nobody
cipher AES-256-CBC
auth SHA256
status openvpn-status.log
verb 6
explicit-exit-notify 1
client
ifconfig
proto udp
dev tun
cipher AES-256-CBC
auth SHA256
remote
user nobody
group nobody
secret static.key
verb 3
- from Play Store, download "OpenVPN for Android" by Arne Schwabe
- adb push </path/to/client.ovpn> /sdcard/Download
- adb push </path/to/static.key> /sdcard/Download
- in application, add profile
- IP AND DNS --> searchDomain -->
- ROUTING --> IPv[4|6] --> Use default route -->
(and mesh-wifi configuration, if necessary)
- port forward <> to <>
on server:
- sudo openvpn --config </path/to/server.conf>
on phone, in application:
- tap profile and connect