Use Squid as a proxy server in Ubuntu8.04

Source: Internet
Author: User
I always wanted to create an Internet proxy server and run Openwrt on the WRT54G. I had too little knowledge to find and had no way to configure it successfully. Now I ran Ubuntu8.04 ON THE IBMT234MC notebook. Although the configuration is very simple, it can still work, very good and powerful. First, let's talk about the network configuration of my machine. There are two NICs, one is the built-in Intel10/M Nic, and the other is the SMCPCMCIA10/M Nic.

I always wanted to create an Internet proxy server and run Openwrt on the WRT54G. I had little knowledge and had no way to configure it successfully. Now I ran Ubuntu 8.04 on the IBM T23 4MC notebook.

Although the configuration is very simple, it can still work, very good and powerful.

First, let's talk about the network configuration of my machine. There are two NICs, one is the Intel 10/100 m nic that comes with the local machine, the other is the smc pcmcia 10/100 M Nic, although at the same time 10/100 M Nic, however, the PCMCIA Nic is much slower than the local Nic. Even if it runs at 100 M, it is estimated that only the bandwidth of the PCI Nic is 10 M. Therefore, the PCMCIA Nic is connected to the Internet, DHCP is set, public IP is obtained, and the Intel Nic is set to static IP: 192.168.2.1, used to connect to the subnet, you can use an Ethernet switch to expand the number of connections, but it is not required for me now, because I only need to connect to my Dell D620.

Step 1: Install
Sudo apt-get install squid

Step 2: Configure squid. conf
Sudo vi/etc/squid. conf

Add a row to set visible_hostname:
Visible_hostname XXXX # XXXX is the name you want

Set the allowed CIDR blocks:
Acl lan src 192.168.2.0/24
Http_access allow lan

The preceding two statements allow subnet proxy, where lan is a temporary alias.

In this way, use the Intel Nic to set an IP address 192.168.2.7 on my D620, set the proxy to 192.168.2.1 and port to 3128 in IE/Firefox, and select "All thanks" to use this proxy, in this way, you can log on to the web page on D620.

Proxies from Intenet are allowed:
Acl wan src 203.94.XX.XX
Http_access allow wan

The preceding two statements allow proxy requests from 203.94.XX.XX.

Step 3: Start Squid
Sudo squid-z
Sudo/etc/init. d/squid reload
Sudo/etc/init. d/squid restart

After testing, proxy requests from the LAN and WAN can be successful. This configuration is still rough and not very secure.

In addition, we have not yet learned how to act as a transparent agent. We will continue to update the agent later.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.