IP firewall rules

I’m making a website that only allows certain IP addresses on it. I used firewall rules for this. Here’s the rule: If the IP does not match [IP I put in] or [other IPs I put in], block. It just ends up blocking everybody. PLEASE HELP!

Try

(not ip src in {123.456.789.1 456.789.123.3 789.123.456.0/24})

If you have a specfic hostname like subdomain.domain.com it could look like

(http.host contains "subdomain" and not ip.src in {123.456.789.1 456.789.123.3 789.123.456.0/24})

or

(http.host eq "subdomain.domain.com" and not ip.src in {123.456.789.1 456.789.123.3 789.123.456.0/24})


Action -> block

2 Likes

Thanks for the help!

2 Likes

I’m using firewall rules to edit access to my website. What I did is this: It automatically blocks everybody. But if user IP is [my IP] then allow them. This works fine. Now I’m just wondering if you can add a specific firewall rule to a specific subdomain.

Was anything unclear? :thinking:

IP firewall rules

1 Like

No. But here’s my new question: Can a make a specific rule for a specific subdomain/url?

This topic was automatically closed after 30 days. New replies are no longer allowed.