Forums

zhura
zhura
Offline
Resolved
0 votes
Nick Howitt wrote:

By default OpenVPN runs on both udp:1194 and tcp:1194 in ClearOS. This is a bit of an odd concept. When you download your OpenVPN config file it is for UDP only. Longer term it is probably the intention to remove the tcp configuration but it is not really safe to do mid-release. You may as well close the firewall to tcp:1194

can you please explain how to enable BOTH tcp and udp connections to one clearos openvpn server? i have clearos-ovpn network working on udp and trying to connect from routeros 6.48 which only can use tcp and upon connection i receive RST from clearos. see screenshot
Attachments:
In OpenVPN
Monday, February 08 2021, 06:06 AM
Share this post:
Responses (16)
  • Accepted Answer

    zhura
    zhura
    Offline
    Friday, February 12 2021, 12:31 PM - #Permalink
    Resolved
    0 votes
    Nick Howitt wrote:Do an "iptables -nvL"

    i got it. thanks
    The reply is currently minimized Show
  • Accepted Answer

    Friday, February 12 2021, 11:39 AM - #Permalink
    Resolved
    0 votes
    You need more info to see what is going on. Do an "iptables -nvL". Copy the results from the terminal and paste between "code" tags (the piece of paper icon with a <> on it).
    The reply is currently minimized Show
  • Accepted Answer

    zhura
    zhura
    Offline
    Friday, February 12 2021, 11:07 AM - #Permalink
    Resolved
    0 votes
    when i disabling ssh port 22 i cannot access clearos by ssh. but in iptables i saw 4 rules "allow all" - how does it works???
    The reply is currently minimized Show
  • Accepted Answer

    Friday, February 12 2021, 10:54 AM - #Permalink
    Resolved
    0 votes
    You see that from time to time with different networking operations. I've no idea how normal it is and cannot investigate on any 5.x system.
    The reply is currently minimized Show
  • Accepted Answer

    zhura
    zhura
    Offline
    Friday, February 12 2021, 10:51 AM - #Permalink
    Resolved
    0 votes
    when i restarting ovpn on clearos i saw this...
    is it normal? what does it means?
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, February 10 2021, 10:14 AM - #Permalink
    Resolved
    0 votes
    Have a look at the OpenVPN parameter "client-to-client" but I don't know if it works between different instances of OpenVPN. Also note for routing, you need routes in both directions. You are showing the routes in the Mikrotik, but do the devices in the 10.10.x.0/24 subnets have routes back to 10.9.0.0/24?
    The reply is currently minimized Show
  • Accepted Answer

    zhura
    zhura
    Offline
    Wednesday, February 10 2021, 10:00 AM - #Permalink
    Resolved
    0 votes
    Nick Howitt wrote:
    I guess what you now need is lots of routes in the Mikrotik config to force traffic to 10.10.x.0/24 via 10.9.0.1. Similarly in the other tunnels you may need a route to force traffic to 10.9.0.0/24 via 10.8.0.1. You could "push" these routes from the server or hardcode them into the clients.
    routerOS received routes from clearOS when connecting to openvpn - on screenshot.

    i'm having difficulties with understanding how to route traffic between 10.8.0.0 and 10.9.0.0 subnets :(

    can different protocols (tcp & udp) be the troubling point? maybe clearOS cannot route packets from udp to tcp and back? or the openvpn itself...
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, February 10 2021, 09:41 AM - #Permalink
    Resolved
    0 votes
    Different instances of OpenVPN must have different subnets or OpenVPN will not know which interface to route the traffic out to.

    I guess what you now need is lots of routes in the Mikrotik config to force traffic to 10.10.x.0/24 via 10.9.0.1. Similarly in the other tunnels you may need a route to force traffic to 10.9.0.0/24 via 10.8.0.1. You could "push" these routes from the server or hardcode them into the clients.
    The reply is currently minimized Show
  • Accepted Answer

    zhura
    zhura
    Offline
    Wednesday, February 10 2021, 05:41 AM - #Permalink
    Resolved
    0 votes
    Nick Howitt wrote:
    Note that the ifconfig-pool-persist and status parameters should be different with each conf file. Also note that your OpenVPN is old and I don't know how compatible it is with current clients.

    yes they are different.but something still wrong. see screenshots - why there aren't routes for 10.9.0.0 subnet? aren't those settings must form them like similar settings form routes for 10.8.0.0 subnet?

    do i really need to setup different subnet on different openvpn instances (tcp & udp) ? because routing to both subnets brings me some headache
    The reply is currently minimized Show
  • Accepted Answer

    Monday, February 08 2021, 02:54 PM - #Permalink
    Resolved
    0 votes
    Note that the ifconfig-pool-persist and status parameters should be different with each conf file. Also note that your OpenVPN is old and I don't know how compatible it is with current clients.
    The reply is currently minimized Show
  • Accepted Answer

    zhura
    zhura
    Offline
    Monday, February 08 2021, 02:30 PM - #Permalink
    Resolved
    0 votes
    Nick Howitt wrote:
    Have you opened the incoming firewall to tcp:1194?
    of cause. but i did it through web-interface then suddenly found in iptables much more rules some of which causing troubles like dropping all incoming tcp SYN packets... epic default settings i think ))

    Please note that ClearOS 5.2 is antique and should not be used in production. It has not had any updates for years and should be considered as insecure. It certainly has not been patched for Spectre or the recent SSH vulnerability.
    may be actually that is the case...

    now i successfully established tcp ovpn tunnel but i still cannot ping any host behind it :( continuing to dig through RTFM and other logs--smoking procedures :)
    The reply is currently minimized Show
  • Accepted Answer

    Monday, February 08 2021, 11:57 AM - #Permalink
    Resolved
    0 votes
    Have you opened the incoming firewall to tcp:1194?

    Please note that ClearOS 5.2 is antique and should not be used in production. It has not had any updates for years and should be considered as insecure. It certainly has not been patched for Spectre or the recent SSH vulnerability.
    The reply is currently minimized Show
  • Accepted Answer

    Monday, February 08 2021, 11:54 AM - #Permalink
    Resolved
    0 votes
    Messages aren't disappearing. As a new user they are automatically moderated for the first few posts. Your posts should now appear immediately.
    The reply is currently minimized Show
  • Accepted Answer

    zhura
    zhura
    Offline
    Monday, February 08 2021, 11:38 AM - #Permalink
    Resolved
    0 votes
    my messages here strangely disappering...
    The reply is currently minimized Show
  • Accepted Answer

    zhura
    zhura
    Offline
    Monday, February 08 2021, 10:24 AM - #Permalink
    Resolved
    0 votes
    Nick Howitt wrote:
    I've deleted your posts to the other thread.
    yes, thanks. i was a bit lost in this forum at first.
    AFAIK the OpenVPN tcp config should be running automatically. What version of ClearOS are you running? What does "ls /etc/openvpn/*.conf" show?

    clearOS enterprise 5.2
    /etc/openvpn/clients.conf /etc/openvpn/server.conf
    i've added server.conf just yet. in it i've changed "proto udp" to "proto tcp" and 10.8.0.0 to 10.9.0.0
    when i manually starting openvpn with server.conf - i've seen the correct SYN ACK on routerOS. but tunnel doesn't forming. now going to dig logs for some clues.

    thanks for answer. i may be in need for further help anytime soon...
    The reply is currently minimized Show
  • Accepted Answer

    Monday, February 08 2021, 09:46 AM - #Permalink
    Resolved
    0 votes
    I've deleted your posts to the other thread.

    AFAIK the OpenVPN tcp config should be running automatically. What version of ClearOS are you running? What does "ls /etc/openvpn/*.conf" show?
    The reply is currently minimized Show
Your Reply