iptable to block a sub-domain
HI all.,
Is it possible to block a subdomain or a one lower level directory URL access from other hosts or network ? I have a site running on my server and i want to block the particular directory under the domain, with the exception of loopback access? I mean the directory must be accessible from loopback/localhost. http://mydomain.com/sub on port 10016(expect loopback) http://mydomain.com/sub/sub1 on port 10016 (expect loopback) please suggest Code:
iptables -I INPUT 1 -i lo -p tcp --dport 10016 -m string -algo kmp --string "mydomain/sub" -j ACCEPT |
You can't do this with iptables, it's none if it's business. You should look at mod_authz on apache for this.
|
All times are GMT -5. The time now is 03:13 AM. |