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.
Have got a linux server working, with 2 NICs, using firestarter and privoxy, taking data from a adsl modem/router and feeding it to a wireless based lan.
All seems to be fine and the privoxy stuff works but the downstream lan users can still bypass the proxy, by just not setting the proxy, that is by direct access to http via port 80.
I am sure that this can be blocked/denied by a call to iptables (which I use for nat) but can't figure out the exact syntax.
sounds like what you want to do is transparent proxying... by doing it like this, all tcp port 80 packets going from the lan to the internet will be redirected automatically to the proxy... this way the machines on the lan don't even need to be configured to use a proxy, the proxying becomes transparent to the users on the lan... this is what the iptables rule would look like if eth1 is your lan interface and your proxy is listening on port 3128:
also keep in mind that you'll probably need to configure your privoxy to be able to work transparently... i'm not sure how that works with privoxy, but on squid basically all you need to do is add these lines to your squid.conf:
Code:
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
squid would also need to be compiled using the --enable-linux-netfilter option...
i just found this in the Privoxy Faq (Section 3.18):
Quote:
Can Privoxy run as a "transparent" proxy?
No, Privoxy currently does not have this ability, though it is planned for a future release. Transparent proxies require special handling of the request headers beyond what Privoxy is now capable of.
Chaining Privoxy behind another proxy that has this ability should work though. See the forwarding chapter in the user manual.
so it looks like for now you'd have to install something like squid anyways in order to get privoxy to work in a transparent fashion for your lan...
Thanks for your help. This is proving to be a fair bit more complicated than I expected. But with kids and the internet, what is the choice?
One other question, in you post you mention:
sounds like what you want to do is transparent proxying... by doing it like this, all tcp port 80 packets going from the lan to the internet will be redirected automatically to the proxy...
Sorry to appear thick but what about the tcp port 80 packets going from the internet to the lan?
Originally posted by gjhicks but what about the tcp port 80 packets going from the internet to the lan?
there wouldn't be any... the machines on your lan would be establishing a connection to the proxy server... the proxy server would establish a connection to the internet... there wouldn't be any 80/tcp connection between the lan and the internet at any point...
thanks again, I guess I should have tumbled to that.
I don't mind having to configure the kids computers to use the privoxy port but, as I said earlier, denying access to the "raw" http port 80 is also an aim.
Am I right in assuming that the code mentioned above:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.