This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| network_stuff:vpn_troubleshooting [2018/01/19 21:09] – jotasandoku | network_stuff:vpn_troubleshooting [2023/11/02 14:38] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 41: | Line 41: | ||
| * http:// | * http:// | ||
| - | **OPENVPN** | + | **OPENVPN |
| * **Installation**: | * **Installation**: | ||
| * pki, ca, server and client cert (after being generated) + configuration , in : / | * pki, ca, server and client cert (after being generated) + configuration , in : / | ||
| Line 57: | Line 57: | ||
| # also enable ip forwarding with sysctl.conf and don't forget systemctl restart network.service | # also enable ip forwarding with sysctl.conf and don't forget systemctl restart network.service | ||
| - | **Operation**\\ | + | Start server: |
| systemctl start openvpn-server@server.service # Server | systemctl start openvpn-server@server.service # Server | ||
| - | | + | |
| + | Create ovpn file and start client: | ||
| + | [[https:// | ||
| + | | ||
| | | ||
| If redirection fails:\\ | If redirection fails:\\ | ||
| + | systemctl stop firewalld | ||
| + | systemctl start firewalld | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ---- | ||
| + | **OPENWRT CLIENT OPENVPN**: | ||
| + | In LuCi: | ||
| + | * Click Update-list | ||
| + | * Then INSTALL: luci-app-openvpn openvpn-easy-rsa openvpn-openssl | ||
| + | * Press OK on each of them to download and install them. | ||
| + | |||
| + | In CLI, Have these files: | ||
| + | |||
| + | root@OpenWrt:/ | ||
| + | config openvpn ' | ||
| + | option config '/ | ||
| + | option enabled ' | ||
| + | | ||
| + | Firewall and network config (from [[https:// | ||
| + | |||
| + | |||
| + | root@OpenWrt:/ | ||
| + | config zone ' | ||
| + | option name ' | ||
| + | list network ' | ||
| + | list network ' | ||
| + | option output ' | ||
| + | option forward ' | ||
| + | option masq ' | ||
| + | option mtu_fix ' | ||
| + | option input ' | ||
| + | list device ' | ||
| | | ||
| + | root@OpenWrt:/ | ||
| + | config interface ' | ||
| + | option proto ' | ||
| + | option ifname ' | ||
| + | |||
| + | |||
| + | ---- | ||
| + | |||
| + | |||
| + | LINUX VPN-CLIENT\\ | ||
| + | [[https:// | ||
| + | \\ | ||
| + | START:\\ | ||
| + | mkdir -p / | ||
| + | touch / | ||
| + | service strongswan restart | ||
| + | service xl2tpd restart | ||
| + | strongswan up myvpn | ||
| + | echo "c myvpn" > / | ||
| + | ip route add 0/0 dev ppp0 | ||
| + | \\ | ||
| + | STOP:\\ | ||
| + | ip route del 0/0 dev ppp0 | ||
| + | echo "d myvpn" > / | ||
| + | strongswan down myvpn | ||
| | | ||
| + | INVESTIGATE WHY CRASHES SOMETIMES: | ||
| + | May 9 05:16:22 observium xl2tpd: xl2tpd[23954]: | ||
| + | May 9 05:16:22 observium xl2tpd: xl2tpd[23954]: | ||
| + | |||
| + | |||
| + | LIBRESWAN STRONGSWAN NOTES: | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * pluto is is an IKE (" | ||
| + | |||
| + | yum install libreswan | ||
| + | ipsec initnss | ||
| + | systemctl enable ipsec | ||
| + | systemctl start ipsec | ||
| + | | ||
| + | # Use this to add and bring up the tunnel and see the exchange! | ||
| + | ipsec auto --add mycompany2-tunnel-1 | ||
| + | ipsec auto --up mycompany2-tunnel-1 | ||
| + | |||
| + | |||
| + | * In the vnic: "tick skip Source/Dest Checks" | ||
| + | * modify | ||
| + | |||
| + | # https:// | ||
| + | conn mycompany2-tunnel-1 | ||
| + | | ||
| + | # leftid=193.123.39.207 # This is the public IP (nat-t) | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | |||
| + | |||
| + | cat / | ||
| + | my-pub-ip x-end-pub-ip : PSK " | ||
| + | |||
| + | |||
| + | ---- | ||
| + | CLASSY IPSEC-VPN TROUBLESHOOT: | ||
| + | * [[http:// | ||
| + | * [[https:// | ||