Results 1 to 5 of 5

Thread: setting openvpn server and client

  1. #1
    Join Date
    Aug 2013
    Beans
    3

    setting openvpn server and client

    GREETINGS all!
    I am starting use Linux month ago. Please help me to understand.
    there are 2 servers running on ubuntu server 12.04. first connected via openvpn to the second server. Necessary start the openvpn server, the second server in the fall. How is it implemented?
    P.S. If I place two config on the first server, it automatically starts both the config file.

    Thanks a lot.

  2. #2
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    12,067
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: setting openvpn server and client

    If both machines are configured to start the network at boot, the norm for servers, then install OpenVPN on both machines with a shared static key. On the client add the "remote name.of.the.server" directive to the configuration. When it boots it will try to the connect to the server and establish the connection. If it cannot do so, it will wait a while and try again.
    If you ask for help, please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  3. #3
    Join Date
    Aug 2013
    Beans
    3

    Re: setting openvpn server and client

    Thank you, SeijiSensei, for your answer.
    the first, sorry for my English.
    I, apparently, badly laid out the problem. I'll try again:
    there are two iron server running ubuntu (to be specific, server A and server B). Both set openvpn. A server - core, Server B - backup. And as long as the server is running, Server B connects to it as a client openvpn (for exchange of service information), as soon as Server A drops, Server B has to stop openvpn client side and server-side rear (respectively with the same settings that were in the server A ).
    How to implement the shutdown process openvpn client and the subsequent lifting open vpn server.
    Thank you.

  4. #4
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    12,067
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: setting openvpn server and client

    So, if I understand you correctly, you want the client to become the server if the original server goes offline?

    You could write a bash script on the client to do this I suspect. The script would ping the server and, if the ping times out, execute the commands you need to change from client to server. Something like:

    Code:
    while [ "$(ping -c5 server_ip | grep '\ 0% packet loss')" != "" ]
    do
         sleep 10
    else
         do stuff
    done
    replacing "do stuff" with whatever procedures you want the script to execute if it can no longer connect.
    Last edited by SeijiSensei; September 7th, 2013 at 06:02 AM.
    If you ask for help, please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  5. #5
    Join Date
    Aug 2013
    Beans
    3

    Re: setting openvpn server and client

    Thank you very much. I'll try do it. And write the result.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •