Configurations Proxy Servers—Squid On Linux

May 11, 2008 by ferryfauzi

Overview

Proxy servers operate as an intermediary between a local network and services available on a larger one, such as the Internet. Requests from local clients for Web services can be handled by the proxy server, speeding transactions as well as controlling access. Proxy servers maintain current copies of commonly accessed Web pages, speeding Web access times by eliminating the need to access the original site constantly. They also perform security functions, protecting servers from unauthorized access. Squid is a free, Open Source proxy-caching server for Web clients, designed to speed Internet access and provide security controls for Web servers. It implements a proxy-caching service for Web clients that caches Web pages as users make requests. Copies of Web pages accessed by users are kept in the Squid cache, and as requests are made, Squid checks to see if it has a current copy. If Squid does have a current copy, it returns the copy from its cache instead of querying the original site. If it does not have a current copy, it will retrieve one from the original site. In this way, Web browsers can then use the local Squid cache as a proxy HTTP server. Squid currently handles Web pages supporting the HTTP, FTP, and SSL protocols (Squid cannot be used with FTP clients). Replacement algorithms periodically replace old objects in the cache. You can find out more about Squid at squid.squid-cache.org.

As a proxy, Squid does more that just cache Web objects. It operates as an intermediary between the Web browsers (clients) and the servers they access. Instead of connections being made directly to the server, a client connects to the proxy server. The proxy then relays requests to the Web server. This is useful for situations where a Web server is placed behind a firewall server, protecting it from outside access. The proxy is accessible on the firewall, which can then transfer requests and responses back and forth between the client and the Web server. The design is often used to allow Web servers to operate on protected local networks and still be accessible on the Internet. You can also use a Squid proxy to provide Web access to the Internet by local hosts. Instead of using a gateway providing complete access to the Internet, local hosts can use a proxy to allow them just Web access (see Chapter 5). You can also combine the two, allowing gateway access, but using the proxy server to provide more control for Web access. In addition, the caching capabilities of Squid can provide local hosts with faster Web access.

Technically, you could use a proxy server to simply manage traffic between a Web server and the clients that want to communicate with it, without doing caching at all. Squid combines both capabilities as a proxy-caching server.

Squid also provides security capabilities that let you exercise control over hosts accessing your Web server. You can deny access by certain hosts and allow access by others. Squid also supports the use of encrypted protocols such as SSL (see Chapter 22). Encrypted communications are tunneled (passed through without reading) through the Squid server directly to the Web server.

Squid is supported and distributed under a GNU Public License by the National Laboratory for Applied Network Research (NLANR) at the University of California, San Diego. The work is based on the Harvest Project to create a Web indexing system that included a high-performance cache daemon called cached. You can obtain current source code versions and online documentation from the Squid home page at www.squid-cache.org. The Squid software package consists of the Squid server, a domain name lookup program called dnsserver, an FTP client called ftpget, and a cache manager script called cachemgr.cgi. The dnsserver resolves IP addresses from domain names, and the ftpget program is an FTP client Squid uses to retrieve files from FTP servers. cachemgr.cgi lets you view statistics for the Squid server as it runs.

On Red Hat, you can start, stop, and restart the Squid server using the squid script, as shown here:

service squid restart

You can also set the Squid server to start up automatically using the redhat-config-services tool or chkconfig.

Configuring Client Browsers

Squid supports both standard proxy caches and transparent caches. With a standard proxy cache, users will need to configure their browsers to specifically access the Squid server. A transparent cache, on the other hand, requires no browser configuration by users. The cache is transparent, allowing access as if it were a normal Web site. Transparent caches are implemented by IPtables using net filtering to intercept requests and direct them to the proxy cache (see Chapter 19).

With a standard proxy cache, users need to specify their proxy server in their Web browser configuration. For this they will need the IP address of the host running the Squid proxy server as well as the port it is using. Proxies usually make use of port 3128. To configure use of a proxy server running on the local sample network described in Chapter 5, you would enter the following. The proxy server is running on turtle.mytrek.com (192.168.0.1) and using port 3128.

192.168.0.1 3128

On Mozilla and Netscape, the user on the sample local network would first select the Proxy panel located in Preferences under the Edit menu. Then, in the Manual proxy configuration’s View panel, enter the previous information. The user will see entries for FTP, Gopher, HTTP, and Security proxies. For standard Web access, enter the IP address in the FTP, Gopher, and Web boxes. For their port boxes, enter 3128.

For GNOME, select Network Proxy in the Preferences menu or window, and for Konqueror on the KDE Desktop, select the Proxies panel on the Preferences | Web Browsing menu window.

Here, you can enter the proxy server address and port numbers.

If your local host is using Internet Explorer (such as a Windows system does), you set the proxy entries in the Local Area Network settings accessible from the Internet Options window.

On Linux or Unix systems, local hosts can set the http_proxy, gopher_proxy and ftp_proxy shell variables to configure access by Linux-supported Web browsers such as lynx. You can place these definitions in your .bash_profile or /etc/profile file to have them automatically defined whenever you log in.

http_proxy=192.168.0.1:3128

ftp proxy=192.168.0.1:3128

gopher_proxy=192.168.0.1:3128

export http_proxy ftp_proxy gopher_proxy

Before a client on a local host could use the proxy server, access permission would have to be given to it in the server’s squid.conf file, described in the later section “Security.” Access can easily be provided to an entire network. For the sample network used here, you would have to place the following entries in the squid.conf file. These are explained in detail in the following sections.

acl mylan src 192.168.0.0/255.255.255.0

http_access allow mylan

Tip

Web clients that need to access your Squid server as a standard proxy cache will need to know the server’s address and the port for Squid’s HTTP services, by default 3128.

squid.conf

The Squid configuration file is squid.conf, located in the /etc/squid directory. In the /etc/squid/squid.conf file, you set general options such as ports used, security options controlling access to the server, and cache options for configuring caching operations. You can use a backup version called /etc/squid/squid.conf.default to restore your original defaults. The default version of squid.conf provided with Squid software includes detailed explanations of all standard entries, along with commented default entries. Entries consist of tags that specify different attributes. For example, maximum_object_size and maximum_object set limits on objects transferred.

maximum_object_size 4096 KB

As a proxy, Squid will use certain ports for specific services, such as port 3128 for HTTP services like Web browsers. Default port numbers are already set for Squid. Should you need to use other ports, you can set them in the /etc/squid/squid.conf file. The following entry shows how you would set the Web browser port:

http_port 3128

Note

Squid uses the Simple Network Management Protocol (SNMP) to provide status information and statistics to SNMP agents managing your network. You can control SNMP with the snmp access and port configurations in the squid.conf file.

Hello Mr. Manto

May 11, 2008 by ferryfauzi

Recognition of Internet Broadband and Existing Type Connection

All consumer internet specially in Indonesia have started to see broadband as media of communications internet of the core important. Don’t compare with the other country which for the housing of even also have used the broadband to super speed.

During a period of its journey, network of internet broadband quite a lot expanding goodness from its technology facet and also its products thrown to marketing by Internet Service Provider. Tren of product broadband from time to time progressively make the internet felt just cheap, though its quality is always not guaranteed nicely. Technology broadband is true become one of factor influencing the wide-speading of use internet.

If other country a lot have felt, in Indonesia possible there are some consumer and computer maniac is not understood about technological internet broadband therewith and its product. So that, technological there is nothing wrong this is we review return with the more having the character of coverage public and general. Though not yet can feel it, at least have there is description hit what technological in fact internet broadband which is a lot of mentioned over and over in metropolis.

Why Broadband?

Technology of internet broadband is in general defined as network or service the internet owning speed transfer high because big bandwidth. Speed transfer ordinary promised by service broadband is until about 128 Kbps or more. Though bandwidth which is reserved for its consumer is very wide, technology of Internet broadband usually this band will be divided with the vinicity consumer. But otherwise there is not using, so you use full of the broadband. Even do not always that way its condition, but tren broadband in Indonesia it is true that way.

Network of Internet broadband can be used by a lot of circle, start from student, gamers, up to small office and office of branch which wish the connection with its head office with the high speed enough. Why they have to consider broadband?

Broadband become so famous because public network internet technology like dial-up have is not adequate again to be used in application in this time. Generally, the applications claim the high speed internet with the time go through fast the data.

Broadband can be told is economic connection, because with paying expense which cheap relative, you can get the connection internet which enough quickly even do not further can that way. With the expense which do not too big, you can run assorted extravagant application of bandwidth, but is not guaranteed by its fluency when a lot of consumer is connected.

Others, Coverage Area from broadband connection also often become its weakness. Coverage Area from this technology it is true not yet can too wide because is true there is technical limitation. In here assess the plus and minus his product of internet broadband.

Any Kind Of existing Technology Broadband?

Technology Broadband which is most commonly used in Indonesia to send the internet connection is Technology of DSL, Technology of Cable, and Wireless Fixed. Each media own the separate excess and insuffiency which exactly make the opdon for which wish to use it. All will be called by one per one here

1. Type of Technology DSL

ü Asymmetric DSL (ADSL)

ü Symmetric DSL (SDSL)

ü G.SHDSL

ü Integrated Service Digital Network DSL (IDSL)

ü Very-high-data-rate DSL (VDSL)

ü High-data-rate DSL (HDSL)

2. Type of Technology Cable

Internet Cable is in fact started from accomplishment of requirement of telecast consumer which will with quality. Genesis of Word Cable even also come from word of Community Antenna Television (CATV) more amount referred as by people as Cable TV. To ascertain the ordinary peripheral TV applicable to Cable TV, technological this remove the ordinary radio signals in broadcast on the air become the in form of signals which can be overcome in pack of cable Coaxial.

Technology cable overcoming internet connection can enable its consumer do the VPN connection to head office by non-stop, so that consumer as owning connection personal band without desisting.

Speed transfer which high relative allied at the price of which do not too costly enable the consumer having its office at home can enjoy the internet quickly also. Technology of TV Cable of plus internet can create the new service, that is Smart TV. Service Cable Provider can make the service VOIP of passing its infrastructure, so that consumer can enjoy also economic telephone from same cable media, not need subscribe to the media else.

Broadband is Commfortable

In a flash of concerning technology broadband have been studied the above, although is little. Technology of DSL and Cable it is true which in this time is famous by a lot of consumer. Altogether own the excess and own its insuffiency. From here segmentation of product broadband formed. Technology DSL seems more is compatible used in Corporate Segment and or big enough SOHO of its traffic data. While, technology Cable more is compatible used by housing requiring additional entertainment amusement as well as internet connection.

Hopefully this article is more benefit, specially as accomplishment grades the lesson of English Language IV by Mr. Manto,Drs. and reader, generally.