Forums

Jameson
Jameson
Offline
Resolved
0 votes
Dumb question, and I can't find this in any documentation. I've setup an OpenVPN, and I can connect and all that jazz. I need to edit the server config file to get my routing setup.

My main question is, how dose one put the sample config file into use? Is there a place I need to move the file? Name?
In VPN
Thursday, October 18 2012, 06:37 PM
Share this post:
Responses (13)
  • Accepted Answer

    Monday, April 23 2018, 08:14 PM - #Permalink
    Resolved
    0 votes
    Hello Ahmed and welcome to the forum.
    Please can I ask you not to bump threads which have been dead for 6 years, especially when there is a very good pointer to the answer in that thread a couple of posts earlier (/etc/openvpn/clients.conf).
    The reply is currently minimized Show
  • Accepted Answer

    Monday, April 23 2018, 07:57 PM - #Permalink
    Resolved
    0 votes
    Hello guys,

    I need to edit the server config file so that I can change the port number which OpenVPN listens on, does any one know where I can find the file ?
    I have ClearOS 7

    Thank you.
    The reply is currently minimized Show
  • Accepted Answer

    Jameson
    Jameson
    Offline
    Friday, October 19 2012, 07:16 PM - #Permalink
    Resolved
    0 votes
    OK - that is the correct syntax. We're looking good, I can connect and now get to my two main subnets (192.168.10.0/24 and 192.168.13.0/24).

    Not 100% sure what the issue really was, I ended up ditching the whole system and starting from scratch (previously my boss was doing the install of the ClearOs, then I was taking over the config, this time I created the VM and install myself)

    I am still having some issues with another couple of subnets, but I think this is outside of the scope of this thread. Those subnets are part of another site, that is routed over a site-to-site VPN (done by firewalls). That's going away and we are moving to a true point-to-point circuit. I'm waiting until then to deal with the routing.

    Thanks for all the assistance

    PS - I had added the .10.0 network originally because I could not access it, and did not get the route for it (the route was not being pushed by the config). So something must have been borked from the get-go
    The reply is currently minimized Show
  • Accepted Answer

    Friday, October 19 2012, 11:15 AM - #Permalink
    Resolved
    0 votes
    When you do the EXTRALANS bit and restart OpenVPN, have a look in /etc/openvpn/clients.conf. You should see a "push-route" line for your normal LAN and for any other LAN defined by the EXTRALANS parameter. I am not sure why you are adding a line for 192.168.10.0/24 as you say that is the ClearOS LAN subnet. Have I missed somethng in your network topology?

    [edit]
    Which O/S is your client running on and, if necessary, are you running as administrator?
    [/edit]
    The reply is currently minimized Show
  • Accepted Answer

    Jameson
    Jameson
    Offline
    Thursday, October 18 2012, 11:31 PM - #Permalink
    Resolved
    0 votes
    Also, a tracert to a server shows the next hop to my gateway.

    I also attempted to add a static route on my PC, but seem to get the same issue.
    The reply is currently minimized Show
  • Accepted Answer

    Jameson
    Jameson
    Offline
    Thursday, October 18 2012, 11:21 PM - #Permalink
    Resolved
    0 votes
    Hm, I must still be doing something wrong. Running as Admin and added my 192.168.10.0/24 to the EXTRALANS


     
    [root@ClearOS ~]# cat /etc/sysconfig/network
    NETWORKING=yes
    HOSTNAME="ClearOS.MyDomain.com"
    NOZEROCONF="yes"
    EXTRALANS="192.168.10.0/24"
    The reply is currently minimized Show
  • Accepted Answer

    Jameson
    Jameson
    Offline
    Thursday, October 18 2012, 09:14 PM - #Permalink
    Resolved
    0 votes
    Good enough - I'll test and find out the proper syntax

    Cheers
    JJ
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, October 18 2012, 08:59 PM - #Permalink
    Resolved
    0 votes
    I have only one extra LAN specified:
    EXTRALANS="192.168.10.0/24"
    Judging by the openvpn init script, separate the LAN's with spaces and only one pait of double-quotes, so:
    EXTRALANS="192.168.13.0/24 192.168.200.0/24"
    Commas may also work but I am not 100% sure of my scripting.

    Restart Openvpn after making the change.
    The reply is currently minimized Show
  • Accepted Answer

    Jameson
    Jameson
    Offline
    Thursday, October 18 2012, 08:31 PM - #Permalink
    Resolved
    0 votes
    Actually, what's the syntax for the EXTRALANS? I don't have this line in there, and I'll add it. M yassumption it's soemthing like:

    EXTRALANS="192.168.13.0/24","192.168.200.0/24,"."..."
    -or-
    EXTRALANS="192.168.13.0 255.255.255.0",.....

    I guess my questions are
    How is subnet defined
    I assume I use quotes
    Do I coma separate the subnets or new lines for each subnet.
    The reply is currently minimized Show
  • Accepted Answer

    Jameson
    Jameson
    Offline
    Thursday, October 18 2012, 08:25 PM - #Permalink
    Resolved
    0 votes
    Awesome, I'll give it a try and report back
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, October 18 2012, 08:14 PM - #Permalink
    Resolved
    0 votes
    If you're using Vista or Win7 you need to run the Openvpn client as administrator or routing will not work. If you want to push extra routes to the client, specify the subnets in the EXTRALANS line of /etc/sysconfig/network. Then the routes will be pushed automatically when the client logs in.
    The reply is currently minimized Show
  • Accepted Answer

    Jameson
    Jameson
    Offline
    Thursday, October 18 2012, 07:06 PM - #Permalink
    Resolved
    0 votes
    As far as I can tell I am using a client-server tunnel - it's an out-of-the-box setup, and the OpenVPN is the only thing I am using it for. Using the windows client.

    I connect just fine, and get an IP (10.8.0.x), but cannot ping/communicate with the remote network (192.168.10.0). I will need to setup more routes, as my remote network has multiple subnets that I'll need access to, but the .10.x is the first step (ClearOs server is in that subnet).

    Note that the local PC's subnet is not in conflict with either subnet.
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, October 18 2012, 06:56 PM - #Permalink
    Resolved
    0 votes
    Which routing are you trying to set up. If you are using a client-server tunnel then you should not need to do anything very much. It should work out of the box.
    The reply is currently minimized Show
Your Reply