Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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 have a linux machine which has internet failover + load balance along with squid now the client machine have 2 options to access internet either directly (w/o squid) and indirectly (with squid). When using indirectly i.e with squid the client machine needs to configure there browsers to access squid, i know that i can automate this task with iptables but I WANT TO ONLY ALLOW FEW IPS TO PASS THROUGH SQUID AND THE REST SHOULD HAVE DIRECT INTERNET CONNECTION. Can this be done using iptables?
okay 1 question i have 3 NICs(say eth0 eth1 eth2) in my system 2 of them (i.e eth0 eth1)have direct ISP access and on third NIC(i.e eth2) is used by my internal lan to access internet also squid is configured on this 3 NIC so i have change that eth1 to eth2 ?
If i want to use some ips and some ranges how do i issue the command? for example i want to only pass these ips through squid 192.168.1.55 192.168.1.57 192.168.1.59 and the range 192.168.1.60-192.168.10.70 and another range 192.168.1.110-192.168.1.115 and give the rest ips a direct access to internet.
If i want to use some ips and some ranges how do i issue the command? for example i want to only pass these ips through squid 192.168.1.55 192.168.1.57 192.168.1.59 and the range 192.168.1.60-192.168.10.70 and another range 192.168.1.110-192.168.1.115 and give the rest ips a direct access to internet.
so if i also want to redirect the udp ports what should be the command?
You could eliminate the "-p TCP" match - that would catch all protocols (you'll need to have removed the --dport match for that to work). Or you could just add a set of almost-identical rules with the only difference being that they use "-p UDP" instead. Keep in mind that a great deal of non-HTTP traffic won't be able to be transparently proxied by Squid, so sending all packets to REDIRECT is just wishful thinking. If your goal is to get a tight grip on all the outgoing connections from these IPs, you need to step in with your firewall rules.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.