How to install openvpn client in Debian?

20,939

I don't think this should be hard. All there is to do is open a terminal and issue:

sudo apt-get install openvpn

Then start openvpn with:

sudo openvpn --config /path/to/configfile.conf

Said config file can be placed anywhere you please, but if it contains references to external files, I suggest placing them all in the same directory and cding to it before starting openvpn.

Share:
20,939

Related videos on Youtube

AjaiVeer Singh Sandhu
Author by

AjaiVeer Singh Sandhu

Updated on September 18, 2022

Comments

  • AjaiVeer Singh Sandhu
    AjaiVeer Singh Sandhu almost 2 years

    I've gone through many tutorials, wiki pages youtube videos about installing. They all are showing how to install openvpn server and use the same with client.

    I was using the config files from tcpvpn.com in Windows and in Manjaro. All I had to do was import the config file and put username and passcode, it would connect and poof internet was working.

    I also tried to learn the difference between server and client. All I got was openvpn is community edition? Please help me here, I am struggling to work this out from last 7 to 8 days.

    Whenever I import the config files of different countries in network manager it has a blank field of ca.crt, I don't know what to do?

  • AjaiVeer Singh Sandhu
    AjaiVeer Singh Sandhu over 7 years
    it shows everything ok but internet connection doesn't work. I checked through ifconfig -a, everything is fine but no downlink at all. Thanks
  • simlev
    simlev over 7 years
    If OpenVPN shows the message ´Initialization Sequence Completed´, then you are connected, good news. Since you can't yet browse the Internet, there are two more things to check: DNS and routes. First, see if domain name resolution is working by running in a different terminal window ´ping google.com´; if it does not work and instead ´ping 8.8.8.8´ is successful, then you need to specify DNS servers. The other thing is routing: you need to instruct your machine to send traffic through the OpenVPN connection.
  • AjaiVeer Singh Sandhu
    AjaiVeer Singh Sandhu over 7 years
    i pinged 8.8.8.8 and it was successful, could you please me with routing - how do i instruct my machine to send traffic though OpenVPN.
  • simlev
    simlev over 7 years
    If you can ping 8.8.8.8 then you have Interrnet connectivity. Does ´ping google.com´ work? If not, it's a DNS issue.
  • AjaiVeer Singh Sandhu
    AjaiVeer Singh Sandhu over 7 years
    pinging 8.8.8.8 was successful but for "www.google.com" it wasn't. I wanna learn how to specify DNS server and routing for OpenVPN. really thanks for helping.
  • AjaiVeer Singh Sandhu
    AjaiVeer Singh Sandhu over 7 years
    I did try to search and figure out the solution for specifying DNS server but all I get is for OpenVPN server and client results and I don't know what to do.
  • simlev
    simlev over 7 years
    What are the contents of /etc/resolv.conf? That is where the DNS servers to be used are stored. To add a DNS server you open Network Tools, choose the relevant interface e.g. Ethernet Interface (eth0), click on Configure, double click the relevant connection e.g. Ethernet->Wired connection 1, click on IPv4 Settings and input e.g. 8.8.8.8 8.8.4.4 (for Google's well known DNS servers) in the Additional DNS servers field. After a reboot your /etc/resolv.conf should contain two additional lines: nameserver 8.8.8.8 and `nameserver 8.8.4.4'.
  • AjaiVeer Singh Sandhu
    AjaiVeer Singh Sandhu over 7 years
    thanks for the big help. Everything is working fine now, though in xubuntu I have to manually edit /etc/resolv.conf everytime. can you help me one other problem I am facing about easy-tether ? or do I have to ask another question for that query ?
  • simlev
    simlev over 7 years
    Did you switch from Debian? In Xubuntu click on the up/down arrow near the top right corner, then click on Edit connections..., double-click on Wired connection 1 -> IPv4 Settings and edit the Additional DNS servers field.
  • simlev
    simlev over 7 years
    I never heard of easy-tether so I can't help you on that, but as a general rule you should always ask a new question when you have a new question.
  • Rodrigo
    Rodrigo over 4 years
    Shouldn't there be a default config file?
  • simlev
    simlev about 4 years
    @Rodrigo The config file contains details about the connection, so it must be specific to it. While it makes little sense to have a default configuration, it could be useful to have a sample configuration file.