Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I want to restrict some systems to access urls like this. only some systems. http://example.com:1234/abc/personId)
any idea now can this be done? and (personid) is a variable.
squid is the only way? because of the system load I cannot go with squid. is this can be done with iptables?
I don't believe that IPtables will be of any benefit to you as it seems you want to filter at the application level. Squid or another proxy would be your best choice, but I am not going to try to debate your position of "can't handle the load". Another option would be to configure the server page(s) for the particular URL with .htaccess which accepts a wide variety of authentication options, for example: http://home.golden.net/htaccess.html
Thanks for your reply. The thing is my server is providing information to mobile apps. So I have a lot of public api's. I can't block them from public. But there are some private api's also. That should be only accessed from three internal systems. And I cannot add additional authentication mechanisms. So my question is how to give access to the private api calls only from the three internal servers.
Now it sounds like you are changing the desired requirement. First you were saying you wanted to restrict URLs, which can be done with either .htaccess or the directory declaration in your host configuration. Now you want to restrict to private a "api", which when you say API, I interpret that as Application Program Interface, or in other words a function call or execution. Perhaps it would be best for you to provide a clear example of exactly what it is you are trying to do instead of playing obfuscation games?
Now it sounds like you are changing the desired requirement. First you were saying you wanted to restrict URLs, which can be done with either .htaccess or the directory declaration in your host configuration. Now you want to restrict to private a "api", which when you say API, I interpret that as Application Program Interface, or in other words a function call or execution. Perhaps it would be best for you to provide a clear example of exactly what it is you are trying to do instead of playing obfuscation games?
Doesn't seem changed to me. htaccess is at a different level to uri filtering, with the two fitting together perfectly well. Not that I ever like using htaccess files compared to putting into a proper httpd config directory include.
But I have some api's which I have to keep private. Which should not be open in public. And those api's should be accessible for three other servers a1.example.com a2.example.com a3.example.com. Any idea how this can be done.
@chris
I'm really sorry that I didn't mention it at the beginning. Even I thought Apache was running in front end. Later only I came to know that only tomcat is there. Now I'm trying it with Remote_Address_Filter in tomcat. But till yet not any improvement.
I changed the setup to apache-tomcat with mod-jk. And I have created .htaccess file. But the problem is .htaccess works with apache serving directories but not the ones under tomcat. Any idea?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.