Tip & How-To about fedora Linux Operating System

How to configure your squid in linux

To configure squid proxy go to
/etc/squid/squid.conf file and then change its port no. from 3128 to 8080.
this is the http port that squid proxy listen for .

Then create your own access list
acl_access name_access_list src networkaddress


Then finally u have the power to allow or deny the particular network


http_access allow name_access_list


Just follow the above three steps to let squid work properly.

You must enable ip forwarding also.

for this go to

/etc/sysctl.conf

in it on the line
net_ipv4 forwarding=0
change it to 1
this will enable the ip forwarding

you can check ip forwarding by

sysctl -p

Posted by on

fedora Linux Operating System Logo

Related Topics:

Related Questions:

1 Answer

The size of squid log files of my proxy server are geting too big for my disk space. I manually deleate them when the disk space is gettin full & the squid service is stoped autometically.How can I delete the squid log files autometically after every 2 days. The location of the log files is /var/log/squid. Give me the full instruction with commands.


Find your squid.conf file. Likely path to it could be /usr/lib/squidc/etc, or
maybe /etc/squid.

That file should contain a setting for logfile_rotate, probably at a default of
10. Change that to 2.

Then add a once-a-day job to root's crontab, on the order of:
1 1 * * * /usr/lib/squid/bin/squid -k rotate

Mar 03, 2008 | Computers & Internet

1 Answer

squid problem


Sorry dear...you cannot configure squid for that ...since squid is a http proxy ..cannot operate it in use for smtp/pop3 connectivity ....
Cheers - Parveen

Feb 22, 2008 | Computers & Internet

1 Answer

firewall is not configered is linux centos


try and go for it..all d best...


**********
Use yum command as follows:
# yum install squid
Output:
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
Output:
init_cache_dir /var/spool/squid... Starting squid: . [ OK ] Verify port 3128 is open:
# netstat -tulpn | grep 3128
Output:
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
Append configuration:
-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
Output:
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:

Nov 26, 2007 | Computers & Internet

Not finding what you are looking for?

503 people viewed this tip

Ask a Question

Usually answered in minutes!

Top fedora Computers & Internet Experts

alex metro
alex metro

Level 3 Expert

331 Answers

Pieter Vleeshouwers
Pieter Vleeshouwers

Level 3 Expert

1806 Answers

tdk1988

Level 2 Expert

121 Answers

Are you a fedora Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Loading...