logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Proper Syntax For White Listing IPs Using "Require IP&q
Author
apishdad



Joined: 01 Jul 2019
Posts: 44
Location: Canada, Toronto

PostPosted: Fri 04 Jun '21 5:43    Post subject: Proper Syntax For White Listing IPs Using "Require IP&q Reply with quote

I am trying to limit connection to my proxy server through ip white listing and have difficulty putting the proper range of ip's.

I know the "Require ip" syntax from Apache documentation here :

http://httpd.apache.org/docs/current/mod/mod_authz_core.html#require

But the one example that they have is a bit vague to me.

So my requirements are to whitelist these IP's

173.245.48.0/20
103.21.244.0/22

is the following syntax valid:

Require ip 173.245.48 103.21.244

Can someone correct me if I am wrong.

Appreciate your help
Back to top
tangent
Moderator


Joined: 16 Aug 2020
Posts: 348
Location: UK

PostPosted: Fri 04 Jun '21 21:59    Post subject: Reply with quote

Your networks are not on 8 bit boundaries, so I'd suggest you need to use CIDR notation:

Code:
Require ip 173.245.48.0/20
Require ip 103.21.244.0/22

I'd use two separate entries to ease management.
Back to top
apishdad



Joined: 01 Jul 2019
Posts: 44
Location: Canada, Toronto

PostPosted: Sat 05 Jun '21 22:01    Post subject: Reply with quote

Thanks tangent for all your help
Back to top


Reply to topic   Topic: Proper Syntax For White Listing IPs Using "Require IP&q View previous topic :: View next topic
Post new topic   Forum Index -> Apache