Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


OpenVPN backup
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

OpenVPN backup

Hi,

Sorry if it sounds like a stupid question.
I want to re-install my low end NAT VPS but I want to keep configuration of OpenVPN like users etc. Is it possible if I can take a backup of OpenVPN and restore with new OS.

Thanks

Comments

  • NyrNyr Community Contributor, Veteran

    Yes, it's possible.

    Assuming you got a default setup, all the data will be on /etc/openvpn (Debian/Ubuntu) or the equivalent dir for your distro.

    Thanked by 1hkhan03
  • @Nyr said:
    Yes, it's possible.

    Assuming you got a default setup, all the data will be on /etc/openvpn (Debian/Ubuntu) or the equivalent dir for your distro.

    Thanks Nyr. Shall I do these step.

    1. Copy/Backup /etc/openvpn folder
    2. re-install new distro (debian, currently ubuntu)
    3. install openvpn
    4. copy backup folder contents to newly installed folder /etc/openvpn
  • NyrNyr Community Contributor, Veteran
    edited January 2015

    Yes, assuming you have a "default" installation (that's the case if by any chance you used my script).

    You would also need to restore the iptables NAT if you are using it. Again that's the case if you used my OpenVPN installer, they are saved in /etc/rc.local.

  • Yes I used your script. so I need to backup /etc/rc.local too ?

  • NyrNyr Community Contributor, Veteran

    That's correct, there are one or two lines added there for the NAT to work after a reboot :)

  • Thanks. but i can not see /etc/rc.local folder, instead i have lot of others rc folder like
    rc0.d
    rc1.d
    rc2.d
    rc3.d
    .
    .
    .
    rcS.d

  • sorry for being stupid. I am a newbie linux user. rc.local is a file. Done backup and going to re-install. Thanks Nyr

    Thanked by 1ATHK
  • new OS installed and OpenVPN working good with old users. Followed Nyr instruction. Thanks Nyr

  • Wira_SoenaryoWira_Soenaryo Member
    edited January 2015

    Sorry hijacking your topic.. but you can install openvpn on low end NAT VPS? Means no IPv4?

    May I know what port number and how to set it? Sorry for my dummy question.

    Update :

    Got the answer... please ignore my question..

    @hkhan03 said:
    Hi,

    Sorry if it sounds like a stupid question.
    I want to re-install my low end NAT VPS but I want to keep configuration of OpenVPN like users etc. Is it possible if I can take a backup of OpenVPN and restore with new OS.

    Thanks

  • @Nyr said:
    Yes, assuming you have a "default" installation (that's the case if by any chance you used my script).

    You would also need to restore the iptables NAT if you are using it. Again that's the case if you used my OpenVPN installer, they are saved in /etc/rc.local.

    Hi Nyr. Faced a problem today. created a new user but new user not connecting to VPN server . Following is the message shown while user creation:


    Tell me a name for the client cert
    Please, use one word only, no special characters
    Client name: clientxyz
    ./vars: line 29: /etc/openvpn/easy-rsa/2.0/whichopensslcnf: Permission denied
    NOTE: If you run ./clean-all, I will be doing a rm -rf on /etc/openvpn/easy-rsa/2.0/keys
    openvpn-install.sh: line 77: /etc/openvpn/easy-rsa/2.0/pkitool: Permission denied
    cat: /etc/openvpn/easy-rsa/2.0/keys/clientxyz.crt: No such file or directory
    cat: /etc/openvpn/easy-rsa/2.0/keys/clientxyz.key: No such file or directory

    Client clientxyz added, certs available at ~/clientxyz.ovpn


  • NyrNyr Community Contributor, Veteran

    Most likely a problem with the permissions.

    Run something like:
    chmod +x /etc/openvpn/easy-rsa/2.0/*

  • AdelAdel Member

    Подскажите пожалуйста где я ошибся. Два сервера ubuntu 20. На 1 сервере установлен openvpn , на втором тоже установлен такой же openvpn, пытаюсь перетащить всю базу и Сертефикаты с первого сервера на второй. Скопировал всю папку openvpn с первого сервера, заливаю на второй сервер, перезагружаю ничего не работает, даже порт закрывается, тот что установлен на openvpn

Sign In or Register to comment.