How to Run Multiple instances of OpenVPN Client-to-LAN?

Home Page Forums Network Management Networking How to Run Multiple instances of OpenVPN Client-to-LAN?

  • This topic is empty.
Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #42078
    securenet
    Member

    Is it possible to have ZeroShell host multiple OpenVPN instances/profiles? Basically I want to have a configuration where OpenVPN-1 service regular employees & OpenVPN-2 service contractors or contracted employees. Employees connect to VPN1 on port XX98 and the contractors connect to VPN2 on port XX89.

    To simply put!
    How would I go about configuring and running multiple instances of OpenVPN Client-to-LAN services, each on a separate port?

    I know that we can use a very large Subnet, assign each group a block of addresses and use static addressing for each client, but that is not the way we want to approach it.

    #49197
    ppalias
    Member

    Yes you can.
    Find the config with

    ps auxw | grep vpn

    Alter the content to your needs and put the new command on a post boot script.

    #49198
    securenet
    Member

    I hate to say this, but I simply do not know how……

    #49199
    securenet
    Member

    If I am understanding you clearly, I should copy the results of the command:
    “root@zeroshell root> ps auxw | grep vpn”, edit its content [such as –port XXXX –ifconfig-pool 192.168.xxx.x 192.168.xxx.xxx 255.255.255.0 –push route-gateway 192.168.xxx.xxx DNS 192.168.xxx.xxx] and put it in a boot script?

    #49200
    ppalias
    Member

    Yes!
    Don’t forget to change the interface name to VPN98 or 97 etc…

    #49201
    securenet
    Member

    I entered it into the Post Boot Script and it tests successfully, but I cannot access the VPN via the new port.

    I even created a new Script and I am still not able to access the VPN via the new Port. I have even restarted the server several times, and still not VPN connection using the new Port.

    Example of MY SCRIPT

    # Bash script: VPN-Cron

    echo vpn –dev-type tap –dev VPN41 –mode server –tls-server –proto udp –port 1XXX –dh /etc/ssl/dh.pem –ca /var/register/system/openvpn/Auth/X509/CAFile –cert /var/register/system/openvpn/TLS/cert.pem –key /var/register/system/openvpn/TLS/key.pem –daemon VPN41_H2L –comp-lzo –ifconfig-pool 197.168.XXX.X 197.168.XXX.XX 255.255.255.0 –push route-gateway 197.168.XXX.254 –push redirect-gateway –push dhcp-option DNS 197.168.XXX.254 –push –client-connect /root/kerbynet.cgi/scripts/ov_connect –client-disconnect /root/kerbynet.cgi/scripts/ov_disconnect –mute 3 –management 127.0.0.1 34001 –keepalive 5 60 –duplicate-cn –client-config-dir /DB/_DB.001/var/register/system/openvpn/ccd

    OPEN VPN Message

    Wed Dec 09 23:29:10 2009 read UDPv4: Connection reset by peer (WSAECONNRESET) (code=10054)
    Wed Dec 09 23:29:13 2009 read UDPv4: Connection reset by peer (WSAECONNRESET) (code=10054)
    Wed Dec 09 23:29:14 2009 read UDPv4: Connection reset by peer (WSAECONNRESET) (code=10054)
    Wed Dec 09 23:29:16 2009 read UDPv4: Connection reset by peer (WSAECONNRESET) (code=10054)

    Please Help

    #49202
    ppalias
    Member

    The openvpn message is on the client side or on the server side? Could you clarify it and post the message of the other one?

    #49203
    securenet
    Member

    The OPEN VPN Message is on the Client Side.

    The server message is SUCCESSFUL.

    #49204
    ppalias
    Member

    Could you increase verbosity on both to locate what is wrong exactly?

    #49205
    securenet
    Member

    No additional information in the logs from the server.

    It seems to me that the Cron is running it like a print job, once the output if successful the job ends.
    Do you think I might be correct in my thinking?

    #49206
    ppalias
    Member

    Remove option

    --daemon VPN41_H2L

    so you can have the output on screen.

    Also… why is the “echo” in front of the line?

    #49207
    securenet
    Member

    When I solely use the results of “ps auxw | grep vpn” the test Fails.
    When I use “echo” the result is successful.

    Is there another command I can use?

    I will remove “–daemon VPN41_H2L” and test it this evening.

    #49208
    ppalias
    Member

    The “echo” command outputs whatever gets as input, so it is accomplished successfully, but the openvpn server is not running.
    Point is after you run the command to verify it is running with the “ps auxw”.

    #49209
    securenet
    Member

    Thank You for your help ppalias, but I am giving up on this project for now. I cannot get it to work and I do not have the time at this moment.

    Again, Thank You …..

    #49210
    ppalias
    Member

    Maybe as a request to Fulvio there could be an option to create secondary etc tunnels via the web interface.

Viewing 15 posts - 1 through 15 (of 16 total)
  • You must be logged in to reply to this topic.