Question about Computers & Internet
How to configer squid and iptables in linux centos pls, give me a help for
step by step configer on linux
Try and go for it..all d best...
Use yum command as follows:
# yum install squid
Loading "installonlyn" plugin Setting up Install Process Setting up repositories Reading repository metadata in from local files Parsing package install arguments Resolving Dependencies --> Populating transaction set with selected packages. Please wait. ---> Package squid.i386 7:2.6.STABLE6-4.el5 set to be updated --> Running transaction check Dependencies Resolved ============================================================================= Package Arch Version Repository Size ============================================================================= Installing: squid i386 7:2.6.STABLE6-4.el5 updates 1.2 M Transaction Summary ============================================================================= Install 1 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 1.2 M Is this ok [y/N]: y Downloading Packages: Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing: squid ######################### [1/1] Installed: squid.i386 7:2.6.STABLE6-4.el5 Complete! Squid Basic Configuration Squid configuration file located at /etc/squid/squid.conf. Open file using a text editor:
# vi /etc/squid/squid.conf
At least you need to define ACL (access control list) to work with squid. The defaults port is TCP 3128. Following example ACL allowing access from your local networks 192.168.1.0/24 and 192.168.2.0/24. Make sure you adapt to list your internal IP networks from where browsing should be allowed:
acl our_networks src 192.168.1.0/24 192.168.2.0/24
http_access allow our_networks
Save and close the file. Start squid proxy server:
# chkconfig squid on
# /etc/init.d/squid start
init_cache_dir /var/spool/squid... Starting squid: . [ OK ] Verify port 3128 is open:
# netstat -tulpn | grep 3128
tcp 0 0 0.0.0.0:3128 0.0.0.0:* LISTEN 20653/(squid) Open TCP port 3128 Finally make sure iptables is allowing to access squid proxy server. Just open /etc/sysconfig/iptables file:
# vi /etc/sysconfig/iptables
-A RH-Firewall-1-INPUT -m state --state NEW,ESTABLISHED,RELATED -m tcp -p tcp --dport 3128 -j ACCEPT
Restart iptables based firewall:
# /etc/init.d/iptables restart
Flushing firewall rules: [ OK ] Setting chains to policy ACCEPT: filter [ OK ] Unloading iptables modules: [ OK ] Applying iptables firewall rules: [ OK ] Loading additional iptables modules: ip_conntrack_netbios_n[ OK ] Client configuration Open a webbrowser > Tools > Internet option > Network settings > and setup Squid server IP address and port # 3128.
See also You may find our previous squid tips useful:
Posted on Jun 22, 2009
A 6ya expert can help you resolve that issue over the phone in a minute or two.
Best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
The service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need.
Posted on Jan 02, 2017
Tips for a great answer:
Feb 21, 2011 | Canon LASER SHOT LBP-2900 Printer
on Apr 24, 2010 | fedora Linux Operating System
May 05, 2010 | Red Hat Enterprise Linux ES Basic Edition
Apr 09, 2010 | Cisco 3845 Integrated Services Router...
Jan 18, 2010 | Cisco ASA 5505 Firewall
Jun 22, 2009 | Computers & Internet
Mar 30, 2009 | Computers & Internet
Jun 13, 2008 | Computers & Internet
Feb 19, 2008 | Nvidia Quadro NVS 280 (64 MB) Graphic Card
388 people viewed this question
Usually answered in minutes!