Sunteți pe pagina 1din 5

11/6/13

Install & Configure Squid in Ubuntu | Linux Fundamentals

Google 7
play.google.com
?

Google Nexus 7
About | Contact Info Lab Hours YouTube/DansCourses Forum Downloads Games

Home

Dans Weekly College Blog


Home Linux Fundamentals Install & Configure Squid in Ubuntu

CCNA 1 CCNA 2 CCNA 3 CCNA 4 CCNA Security Computer Maintenance CMS Joomla & WordPress Flash Web Design Flash Game Programming Flash Multiplayer Prog Linux Fundamentals Maya and 3D Modeling Network Security+ Network Penetration Testing Photoshop Windows Server 2008 Windows 7 & 8 Windows Server 2008 Part 2 SSCP Windows Exchange Server

Install & Configure Squid in Ubuntu


Share
Install Squid Proxy Ubuntu User Squid Linux
Like 15

Squid in Ubuntu Overview


A proxy server is a very useful tool for a network. It is commonly used in computer networks to protect the network from attack, to filter nefarious web content and pages requested by local users, and to speed up the delivery of web pages and web content by caching (storing) commonly requested web pages, documents, and media. Proxy servers are typically implemented on private, local area networks, to filter, protect and cache content requested by users on that network, this is called "proxy" or "transparent proxy." Proxy servers can also be implemented on the remote side "in-front-of" destination webservers in order to protect those servers by filtering requests, speeding up web page delivery, and caching frequently requested files, this is called "reverse proxy." Types of Proxy Servers

Proxy Server

The web browser on the client is configured to point to the proxy server's IP address. The client can bypass the proxy server by removing or altering the proxy address configuration. An administrator could prevent this by creating a GPO in Active Directory that blocks access to the web browser settings. A proxy server can also function as a caching server.

USER LOGIN
Username Transparent Proxy Server The router sends all traffic on defined ports, to the transparent proxy server, this way clients cannot bypass the proxy server. A transparent proxy server can also function as a caching server.

Password

Remember Me
LOGIN

Reverse Proxy Server (Cache)

The reverse proxy server or cache server is placed in-front-of or prior-to the web server in order to speed up delivery of frequently requested pages and to protect the web server by creating a layer of separation and redundancy.
1/5

www.danscourses.com/Linux-Fundamentals/install-a-configure-squid-in-ubuntu.html

11/6/13

Install & Configure Squid in Ubuntu | Linux Fundamentals

Forgot your password? Forgot your username?

TUTORIAL PLAYLISTS
Cisco CCNA-1 Cisco CCNA-2 Cisco CCNA-3 Cisco CCNA-4 CCNA Security Photoshop Joomla Flash Game Programming SmartFox Server

LATEST ARTICLES
Week 8 - Network Addressing Week 10 - Windows Firewall and Security Week 6 - Applications Part 1 Week 5 - Hardware Management Part 2 Week 3 - Install Windows 8 Asteroids Game Stage 5 - Adding Waves and Scoring Asteroids Game Stage 4 - Collision Detection Asteroids Game Stage 3 - Creating and Moving Rocks Asteroids Game Stage 2 - Moving Projectiles Asteroids Game Stage 1 - The Spaceship Squid is one of the most popular and most used proxy servers in the world. It is free to download, easy to install and it can be implemented on any distribution of Linux. Here are the steps to install and configure Squid on an Ubuntu distribution of Linux.

Steps to install and configure Squid


Open a terminal, and type in the following commands to install Squid s u d oa p t g e tu p d a t e s u d oa p t g e ti n s t a l ls q u i d s q u i d c o m m o n Ways to start and stop Squid s u d os e r v i c es q u i ds t a r t ( s t o p | r e s t a r t | s t a t u s ) s u d o/ u s r / s b i n / s q u i d( l a u n c h p r o g r a md i r e c t l y ) s u d op k i l l9s q u i d Navigate to the Squid folder to find the squid.conf configuration file c d/ e t c / s q u i d l s( y o us h o u l ds e et h es q u i d . c o n ff i l e ) Create a backup of the squid.conf file s u d oc ps q u i d . c o n fs q u i d . c o n f . b a k For testing purposes open Firefox and set it to send web requests to the Squid Proxy Server (You will need to know your ip address) i f c o n f i g( w r i t ed o w ny o u ri n e ta d d r e s se . g .1 9 2 . 1 6 8 . 1 . 1 0 0 ) Open Firefox Edit > Preferences, Advanced > Network Tab > Connection-Settings: Manual Proxy Configuration: HTTP Proxy: your IP address or loopback address 127.0.0.1, Port: 3128 Click Ok and Close
2/5

WHO'S ONLINE
We have 87 guests online

www.danscourses.com/Linux-Fundamentals/install-a-configure-squid-in-ubuntu.html

11/6/13

Install & Configure Squid in Ubuntu | Linux Fundamentals

Now if you try and go to a website like google you should see an ERROR - Access Denied message from Squid (see bottom line). This means that Squid is working by actively denying the traffic. Now we need to configure Squid to allow web traffic through the proxy server. Open squid.conf in your favorite text editor like gedit, nano, or vi s u d on a n os q u i d . c o n f or s u d og e d i ts q u i d . c o n f&( I fg e d i td o e sn o to p e nf r o mt h et e r m i n a ly o u c a no p e ni ta sr o o tu s e r ) s u d os u g e d i ts q u i d . c o n f& To switch out of root user s uy o u r u s e r n a m e( i fy o ua r er o o tu s e rt h ep r o m p ti sa" # "s w i t c hb a c k t oy o u ru s e ra c c o u n tp r i v i l e g e ) If you chose to open with squid.conf with gedit, then turn on line numbering (Edit > Preferences > View >Display Line Numbers) Change the name of your Squid Proxy Server, around line 3399, change: # T A G :v i s i b l e _ h o s t n a m e to

v i s i b l e _ h o s t n a m eY o u r N a m e P r o x y S e r v e r You can configure access rules for your Squid proxy server (lines 331 to 831 are for Access Control). Notice that on lines 606 to 630 the local networks and usable ports (services) are defined. Active configuration lines, are the lines that are not commented out, i.e. they do not start with a # sign. To re-enable web access uncomment line 676 # h t t p _ a c c e s sa l l o wl o c a l n e t to h t t p _ a c c e s sa l l o wl o c a l n e t To verify the Web is now working, save your changes to the squid.conf file and restart your Squid server. s e r v i c es q u i dr e s t a r t( o r" s u d os e r v i c es q u i dr e s t a r t "i fy o ua r en o l o n g e rr o o t ) Now resfresh your Firefox web browser and your homepage should be visible. Now we can practice writing a custom ACL (access list) in the squid.conf file to block specific domains and websites. We can write our custom ACL at the end of the acl lines around line 631. From an empty line write the following lines to test domain blocking: a c lb l o c k e d _ w e b s i t e sd s t d o m a i n. m s n . c o m. y a h o o . c o m h t t p _ a c c e s sd e n yb l o c k e d _ w e b s i t e s Now restart your Squid server, and test to see if Squid denies access to your blocked domains/websites in Firefox.
Squid Linux Server 2008 Ubuntu One Proxy Lists
www.danscourses.com/Linux-Fundamentals/install-a-configure-squid-in-ubuntu.html 3/5

11/6/13

Install & Configure Squid in Ubuntu | Linux Fundamentals

Video Tutorials
In this series of videos, I go through the same process outlined above, to install and configure a Squid proxy server in Ubuntu . In part 1, I install Squid in Ubuntu, start and stop it, back up the configuration file, and configure Firefox to use Squid as a proxy server
Install & Configure Squid Proxy Server in Ubunt...

In part 2, I discuss editing the configuration file


Install & Configure Squid Proxy Server in Ubunt...

www.danscourses.com/Linux-Fundamentals/install-a-configure-squid-in-ubuntu.html

4/5

11/6/13

Install & Configure Squid in Ubuntu | Linux Fundamentals

In part 3, I write a custom ACL in the squid.conf file


Install & Configure Squid Proxy Server in Ubunt...

< Prev
Last Updated on Wednesday, 11 September 2013 12:39

Next >

Comments (0)
Only registered users can write comments!
Powered by Compojoom comment 4.2.1

Search

www.danscourses.com/Linux-Fundamentals/install-a-configure-squid-in-ubuntu.html

5/5

S-ar putea să vă placă și