The aim is to provide a simple to follow core instruction on how to configure VPN tunnel without much configuration and technical mumbo jumbo.
This is a companion discussion topic for the original entry at https://linuxconfig.org/simple-openvpn-connection-setup-on-ubuntu-18-04-bionic-beaver-linux
Robert Wortman
attempted to follow instructions to setup vpn network but keeping errors on some commands ie Command ‘inet6’ not found, did you mean:
command ‘inetd’ from deb openbsd-inetd
Try: sudo apt install . I’m new to setting up a VPN server
chest069
I tried this and made the mistake of doing the first part (server) instead of the 2nd part (client) now I can’t connect to my VPN. So how do I undo all of this?
Adrian Odobescu -> chest069
sudo apt purge openvpn
sudo apt autoremove
sudo apt autoclean
I think this will work for you
I tried this on AWS but it stuck at here during my client connection.
tsabug@TCA0080ALKVTAXX:~$ sudo openvpn --remote 3.94.153.139 --dev tun --ifconfig 172.16.0.1 172.16.0.2 --cipher AES-256-CBC --secret static-OpenVPN.key
Wed Jul 8 15:25:32 2020 OpenVPN 2.3.11 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [MH] [IPv6] built on Jun 22 2016
Wed Jul 8 15:25:32 2020 library versions: OpenSSL 1.0.2g 1 Mar 2016, LZO 2.08
Wed Jul 8 15:25:32 2020 TUN/TAP device tun0 opened
Wed Jul 8 15:25:32 2020 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Wed Jul 8 15:25:32 2020 /sbin/ip link set dev tun0 up mtu 1500
Wed Jul 8 15:25:32 2020 /sbin/ip addr add dev tun0 local 172.16.0.1 peer 172.16.0.2
Wed Jul 8 15:25:32 2020 UDPv4 link local (bound): [undef]
Wed Jul 8 15:25:32 2020 UDPv4 link remote: [AF_INET]3.94.153.139:119
Any Idea? Please help
Hi Shaikh_Nazrul_Islam,
Welcome to our forums.
The output you provide seems pretty normal. You forgot to add “&” (and sign) to the end of the command, so your openvpn command does not go to background, but instead occupy your console as long as the connection is up. You can open another terminal to verify your VPN setup, or add the “&” to the end next time, so you can work on the same terminal.