Skip to main content

Blocking a port using the Custom Rules

This example is written for the Canistracci OIL tenant. Create the objects with a Docs Demo prefix, test them on non-production numbers, and then adapt the same structure for the production tenant.

You can add custom rules to block an IP port from generic access and grant only to a specific set of IP addresses

Let's make an example. if you want to block ssh port 22 from any access except from IP 192.168.1.100, you can enter the following data

-s 192.168.1.100/32 -p tcp --dport 22 -j ACCEPT

-p tcp --dport 22 -j DROP

Please take in mind all IP in the "Always allowed list" will be always allowed, regardless what has been entered in the Custom Rules field

Canistracci OIL example screen for Blocking a port using the Custom Rules.
Canistracci OIL example screen for Blocking a port using the Custom Rules.

Validation

  • Confirm the tenant selected in the top bar is Canistracci OIL before creating the example.
  • Verify the created objects appear in the expected Configuration menu page.
  • Place a controlled test call or run the related status check.
  • Remove or disable temporary test numbers when the example is no longer needed.