This is a discussion on retrieving restricted IP from database for apache2 within the Apache Web Server forums, part of the Web Server and Related Forums category; Hi , I want to make Apache2 check user IP on the fly and restrict access if IP does not match ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi ,
I want to make Apache2 check user IP on the fly and restrict access if IP does not match existing client (and redirecting to a page explaining why has it happened) .There is no problem with dynamic DNS since all clients are expected to use static IPs.Ideally I would like to keep IPs in the external mysql database and query it every time request comes because we use this list for several servers.I checked this newsgroup and Googled but could not find that anyone has done it. Has anybody done it ?Or maybe I can find more elegant solution? thank you in advance Sergei |
|
|||
|
daugavpils@gmail.com wrote in news:1169408040.597631.282710
@m58g2000cwm.googlegroups.com: > Hi , > > I want to make Apache2 check user IP on the fly and restrict access if > IP does not match existing client (and redirecting to a page explaining > why has it happened) .There is no problem with dynamic DNS since all > clients are expected to use static IPs.Ideally I would like to keep IPs > in the external mysql database and query it every time request comes > because we use this list for several servers.I checked this newsgroup > and Googled but could not find that anyone has done it. > Has anybody done it ?Or maybe I can find more elegant solution? > > thank you in advance > Sergei > > Do you have access to the httpd.conf? If so then you can do it with the Allow/Deny from statements in a <Directory> container. It wouldn't be in a SQL database, but in a text file. -- ----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups ----= East and West-Coast Server Farms - Total Privacy via Encryption =---- |
|
|||
|
Thank you Mark,
I do have full access to the server.I am not sure though that you can use ip list from file in Allow from directive: http://httpd.apache.org/docs/2.0/mod/mod_access.html .Please correct me if I am wrong Probably another way could be done using ,module like mod_ipenv, but it is not in debian-stable. Sergei Mark wrote: > daugavpils@gmail.com wrote in news:1169408040.597631.282710 > @m58g2000cwm.googlegroups.com: > > > Hi , > > > > I want to make Apache2 check user IP on the fly and restrict access if > > IP does not match existing client (and redirecting to a page explaining > > why has it happened) .There is no problem with dynamic DNS since all > > clients are expected to use static IPs.Ideally I would like to keep IPs > > in the external mysql database and query it every time request comes > > because we use this list for several servers.I checked this newsgroup > > and Googled but could not find that anyone has done it. > > Has anybody done it ?Or maybe I can find more elegant solution? > > > > thank you in advance > > Sergei > > > > > > Do you have access to the httpd.conf? If so then you can do it with the > Allow/Deny from statements in a <Directory> container. It wouldn't be in > a SQL database, but in a text file. > > > > > -- > > ----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==---- > http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups > ----= East and West-Coast Server Farms - Total Privacy via Encryption =---- |