Site Tools


linux:ubuntu:openvpn

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux:ubuntu:openvpn [2019/01/21 12:57] lunetikklinux:ubuntu:openvpn [2021/05/14 17:14] (current) lunetikk
Line 108: Line 108:
 </key> </key>
 </code> </code>
 +
 +===== Commands =====
 +
 +^  Command  ^  Function  ^
 +|   nmap -sL 10.8.0.*    shows all connected clients in the given IP range  |
  
 ===== Connecting a QNAP as client ===== ===== Connecting a QNAP as client =====
Line 168: Line 173:
  
 Reload the "/etc/default/" configs Reload the "/etc/default/" configs
-systemctl daemon-reload +<code>systemctl daemon-reload </code>
  
 Restart the OpenVPN  Restart the OpenVPN 
Line 185: Line 190:
 </code> </code>
  
-===== Raspbian 9 as client =====+===== Connecting a Raspbian 9 as client =====
  
 Install the client Install the client
Line 193: Line 198:
 </code> </code>
  
-Copy the .ovpn file from your server to your client into /etc/openvpn/client/ \\+Copy the .ovpn file from your server to your client into /etc/openvpn/ \\
 Rename it to .conf, for example client.conf Rename it to .conf, for example client.conf
 <code> <code>
Line 207: Line 212:
  
 Reload the "/etc/default/" configs Reload the "/etc/default/" configs
-systemctl daemon-reload +<code>systemctl daemon-reload</code>
  
 Restart the OpenVPN  Restart the OpenVPN 
Line 222: Line 227:
 64 bytes from 10.8.0.1: icmp_seq=1 ttl=64 time=38.6 ms 64 bytes from 10.8.0.1: icmp_seq=1 ttl=64 time=38.6 ms
 64 bytes from 10.8.0.1: icmp_seq=2 ttl=64 time=37.9 ms 64 bytes from 10.8.0.1: icmp_seq=2 ttl=64 time=37.9 ms
 +</code>
 +
 +and with systemctl
 +<code>
 +# systemctl status [email protected]
 +[email protected] - OpenVPN connection to client
 +   Loaded: loaded (/lib/systemd/system/[email protected]; disabled; vendor preset: enabled)
 +   Active: active (running) since Mon 2019-01-21 12:56:38 CET; 3min 6s ago
 +     Docs: man:openvpn(8)
 +           https://community.openvpn.net/openvpn/wiki/Openvpn23ManPage
 +           https://community.openvpn.net/openvpn/wiki/HOWTO
 +  Process: 1684 ExecStart=/usr/sbin/openvpn --daemon ovpn-client --status /run/openvpn/client.status 10 --cd /etc/openvpn --config /etc/openvpn/client.conf --writepid /run/openvpn/client.pid (code=exited, status=0/SUCCESS)
 + Main PID: 1686 (openvpn)
 +   CGroup: /system.slice/system-openvpn.slice/[email protected]
 +           └─1686 /usr/sbin/openvpn --daemon ovpn-client --status /run/openvpn/client.status 10 --cd /etc/openvpn --config /etc/openvpn/client.conf --writepid /run/openvpn/client.pid
 +
 +Jan 21 12:56:40 raspbian ovpn-client[1686]: ROUTE_GATEWAY 192.168.178.1/255.255.255.0 IFACE=wlan0 HWADDR=xx:xx:xx:xx:xx:xx
 +Jan 21 12:56:40 raspbian ovpn-client[1686]: TUN/TAP device tun0 opened
 +Jan 21 12:56:40 raspbian ovpn-client[1686]: TUN/TAP TX queue length set to 100
 +Jan 21 12:56:40 raspbian ovpn-client[1686]: do_ifconfig, tt->did_ifconfig_ipv6_setup=0
 +Jan 21 12:56:40 raspbian ovpn-client[1686]: /sbin/ip link set dev tun0 up mtu 1500
 +Jan 21 12:56:40 raspbian ovpn-client[1686]: /sbin/ip addr add dev tun0 local 10.8.0.6 peer 10.8.0.1
 +Jan 21 12:56:40 raspbian ovpn-client[1686]: /sbin/ip route add 10.8.0.1/32 via 10.8.0.1
 +Jan 21 12:56:40 raspbian ovpn-client[1686]: GID set to nogroup
 +Jan 21 12:56:40 raspbian ovpn-client[1686]: UID set to nobody
 +Jan 21 12:56:40 raspbian ovpn-client[1686]: Initialization Sequence Completed
 </code> </code>
linux/ubuntu/openvpn.1548071836.txt.gz · Last modified: 2019/01/21 12:57 by lunetikk