This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

OpenVPN and UDP Flood Protection

I'm having an issue with the Sophos UTM, where I have a firewall rule that allows a client behind the firewall to connect to an OpenVPN server (I allow connections to UDP port 1194). Everything works great. However, when I enable UDP Flood Protection, the OpenVPN bandwidth drops by orders of magnitude (from over 100 Mbps to less than 3). I can see in the IPS logs that that the IPS flags a "UDP flood detected" to the IP and port of the OpenVPN server. I've added an exception to the IPS to ignore the OpenVPN service (port 1194), but it still flags it.

Am I missing something in the configuration?


This thread was automatically locked due to age.
  • If I remeber correctly flood protection has its own exception settings - are you sure you used the right one?

    Regards
    Manfred
  • So this is what I did. I couldn't find any other exceptions for UDP Flood Protection.
  • OK - wrong memories of me or they changed the layout.

    Did you try some other kind of exception (e.g. coming from these networks and put the internal network in there) or set higher limits in the udp flood protection settings?
  • I figured it out. Looks like for OpenVPN you need to create two services, one for OpenVPN Out (coming from port 1194) and one for OpenVPN In (going to port 1194). Once I did that, everything works fine.
  • I have been looking for the same thing. How exactly are the exceptions set? So we create a service, and we simply decide to label it as "OpenVPN". Then, for the first service we set "1:65535 --> 1194", then for the second service we set "1194 --> 1:65535". If that is correct then we are simply opening ports. Do we lose any protection by doing so? I understand this is only for UDP flood exception.
    Thank you!
    Martin
  • This exception doesn't open any ports, Martin.  You must have a firewall rule that lets "1:65535 --> 1194" traffic out.  The connection tracker will allow the return traffic.

    Cheers - Bob
  • Thank you Bob!
    However, I need to make sure I understood your answer. First of all, I see I used a misleading term, "opening ports". So, you meant we would normally open ports in the firewall; whereas, here the discussion was about setting an exception for flood detection. You also reminded me that we open ports (when needed) for outbound traffic since the firewall will then keep track of the session (so, we specify the direction in firewall). I also understand the connection will not be allowed to initiate from outside (inbound traffic).
    Going back to the UDP flood problem caused when connected to a VPN. I have seen a couple of threads about this problem. The logs showed the UDP flood with source the IP of VPN server and destination with the IP of host computer. I have seen suggestion that vary from "turning off" the UDP flood protection or "setting an exception". I thought this thread had the best suggestion (based on services only) since the VPN IP varies. Looking to my live log (as Heli0s described in his post) I had flooding  going to 1194 and coming from 1194. Creating two services as in my previous post ("1:65535 --> 1194", then for the second service we set "1194 --> 1:65535") resolves the UDP flood problem. In my previous post, I meant to ask this question: Does this make the exception too broad? Today, I refined my exception to also include my computer IP since there is only one computer to use the VPN. So, the exception includes "going to this IP - which is the local IP of my computer" AND "Using these services - these are the two services as described above". Please note the use of "AND". Does this narrow the exception? 
    Thank you,
    Martin
  • UPDATE:
    Refining the exception by adding "Going to" the local computer IP  using "AND" (though it worked yesterday) doesn't work (and it probably is not supposed to work). The logs of yesterday made me come with that idea; however, today the logs show udp flood traffic going to my external IP. 
    Now I have to select between these two options:
    1. Create the exception with just two services, "VPN in" and "VPN out"
    2. Same as in option 1, but also add a broad subnet of VPN server.
    Which option is better?
    Thank you,
    Martin
  • Martin, is the OpenVPN server at a fixed IP or FQDN?  Does your client have a fixed IP or an FQDN as a member of a Windows domain?  If either of those is true, I would use an Exception for coming from OR going to AND the two OpenVPN services.

    Cheers - Bob
  • Bob,
    The IP of VPN server is not fixed. This is a paid VPN service. My client computer that uses this VPN service is located in one interface of Sophos UTM. I have isolated this interface from my other interfaces. The client computer gets a static IP from the Sophos. 
    Just using two VPN services as an exception it works. In order to narrow the exception I wanted to add the IP of VPN server. That is not fixed; however, I thought to use a range of possible IP's I would normally get. So, I added 107.58.0.0/16 as "coming from these source". So far all worked, but I noticed flood coming from the LAN IP of my computer. Therefore, I created a second exception with "coming from these source network = local LAN Ip"
    It is working so far. Thank you Bob for the suggestions. You are very helpful as always.
    Please let me know if missed anything, or I am completely doing it wrong. Otherwise, 
    Greetings!
    Martin