How to limit the amount of connections from a source IP
06/01/2023 58 People found this article helpful 491,150 Views
Description
This article goes over how to limit the amount of connections being established from a source IP. This can be helpful for if there are too many connections being established by down stream clients. This method can also be used as a "bandwidth management" solution if the WAN connection is being consumed to quickly (aka, a 10mbps line is completely saturated and the Internet is going slow due to the saturation).
Resolution
Resolution for SonicOS 7.X
This release includes significant user interface changes and many new features that are different from the SonicOS 6.5 and earlier firmware. The below resolution is for customers using SonicOS 7.X firmware.
We will use access rules to enable connection limiting. There are two types of connection limiting: Percentage based and threshold based (by source or destination IP). We will focus on threshold connection based limiting.
Step 1: Under Monitor | Tools and monitor | Connections we can view connection flow by source or destination IP, protocols, etc:
Step 2: We can see that an internal IP has around 36 connections opened. This is a normal behavior with multiple browser tabs opened. We will limit the amount of connections based on source IP to 5 connections. Remember, this is for demonstration purposes only. Please gather a baseline average of opened flows per user on your network.
Step 3: Next, navigate to the Policy | Rules and policy | Access Rules page. Edit the designated access rule (we will be editing the default LAN > WAN access rule). By selecting the Advanced tab we will find the connection limiting features. We will limit the connections to 5 connections via source IP.
Example as shown in image below:
Step 3: We can confirm that the connection limiting is working correctly by viewing the connections under Monitor | Tools and monitor | Connections
Once the access rule has been implemented with the change the connections expired and were prevented from reconnecting. Using connection limiting based on destination limiting can also be helpful if a company is hosting a web server which is being bombarded by the same external IP address.
Resolution for SonicOS 6.5
This release includes significant user interface changes and many new features that are different from the SonicOS 6.2 and earlier firmware. The below resolution is for customers using SonicOS 6.5 firmware.
We will use access rules to enable connection limiting. There are two types of connection limiting: Percentage based and threshold based (by source or destination IP). We will focus on threshold connection based limiting.
Step 1: Under Investigate | System Diagnostics | Connection Monitor we can view connection flow by source or destination IP, protocols, etc:
Step 2: We can see that an internal IP has around 36 connections opened. This is a normal behavior with multiple browser tabs opened. We will limit the amount of connections based on source IP to 5 connections. Remember, this is for demonstration purposes only. Please gather a baseline average of opened flows per user on your network.
Step 3: Next, navigate to the Rules | Access Rules page. Edit the designated access rule (we will be editing the default LAN > WAN access rule). By selecting the Advanced tab we will find the connection limiting features. We will limit the connections to 5 connections via source IP.
Example as shown in image below:
Step 3: We can confirm that the connection limiting is working correctly by viewing the connection monitor under Investigate | System Diagnostics.
Once the access rule has been implemented with the change the connections expired and were prevented from reconnecting. Using connection limiting based on destination limiting can also be helpful if a company is hosting a web server which is being bombarded by the same external IP address.
Resolution for SonicOS 6.2 and Below
The below resolution is for customers using SonicOS 6.2 and earlier firmware. For firewalls that are generation 6 and newer we suggest to upgrade to the latest general release of SonicOS 6.5 firmware.
We will use access rules to enable connection limiting. There are two types of connection limiting: Percentage based and threshold based (by source or destination IP). We will focus on threshold connection based limiting.
Step 1: Under System | Diagnostics | Connection Monitor we can view connection flow by source or destination IP, protocols, etc:
Step 2: We can see that an internal IP has around 36 connections opened. This is a normal behavior with multiple browser tabs opened. We will limit the amount of connections based on source IP to 5 connections. Remember, this is for demonstration purposes only. Please gather a baseline average of opened flows per user on your network.
Step 3: Next, navigate to the Firewall | Access Rules page. Edit the designated access rule (we will be editing the default LAN > WAN access rule). By selecting the Advanced tab we will find the connection limiting features. We will limit the connections to 5 connections via source IP.
Step 3: We can confirm that the connection limiting is working correctly by viewing the connection monitor under System | Diagnostics.
Once the access rule has been implemented with the change the connections expired and were prevented from reconnecting. Using connection limiting based on destination limiting can also be helpful if a company is hosting a web server which is being bombarded by the same external IP address.
Related Articles
Categories