RHEL5 is a system with good security and stability. For such a system, a good cache server is required to cooperate with it. Squid is such a server, squid is a popular free software proxy server and Web Cache Server. There are many steps in the RHEL5 Squid configuration process. Let's analyze it for you.
I. RHEL5 Squid configuration environment and operating platform
Xp -- eth1) AS5 eth0) -- Internet
192.168.1.0/24 10.0.0.0/8
Linux AS5 squid-2.6RPM)
Ii. RHEL5 Squid configuration and installation
Install the squid-2. 6 rpm package that comes with AS5
Iii. RHEL5 Squid Configuration
Route add default gw 10.100.100.254 // 10.100.100.100.254 connect to the Internet Router address and add the default gateway.
1. squid master configuration file:/etc/squid. conf
A. http_port 3128 transparent // enable transparent mode
B. cache_dir ufs/var/spool/squid 1000 16 256
C. cache_mem 96 M
D. visible_hostname localhost
E. http_access allow all
The above is the basic configuration
2. iptales Configuration
#! /Bin/bash
# Ip. sh
Echo '1'>/proc/sys/net/ipv4/ip_forward // enable ip forward
IPT =/sbin/iptables
$ Ipt-f-t filter
$ Ipt-x-t filter
$ Ipt-z-t filter
$ Ipt-f-t nat
$ Ipt-z-t nat
$ Ipt-x-t nat
$ Ipt-p FORWARD DROP
$ Ipp-input DROP
$ Ipp-output DROP
$ Ipt-t filter-a input-s 127.0.0.1-j ACCEPT
$ Ipt-filter-a input-s 10.10.10.254-p tcp -- dport 22-j ACCEPT
$ Ipt-filter-a output-d 10.10.10.254-p tcp -- sport 22-j ACCEPT
$ EPT-t filter-a input-s 192.168.1.0/24-p icmp -- icmp-type 8-j ACCEPT
$ EPT-t filter-a output-d 192.168.1.0/24-p icmp -- icmp-type 0-j ACCEPT
$ Ipt-t filter-a input-s 192.168.1.0/24-j ACCEPT
$ Ipt-t filter-a input-I eth0-j ACCEPT
$ Ipt-t filter-a output-d 192.168.1.0/24-j ACCEPT
$ Ipt-t filter-a output-o eth0-j ACCEPT
$ Ipt-t filter-a forward-s 192.168.1.0/24-I eth1-o eth0-j ACCEPT
$ Ipt-t filter-a forward-I eth0-o eth1-j ACCEPT
$ Ipt-a FORWARD-m state -- state ESTABLISHED, RELATED-j ACCEPT
$ Ipt-t nat-a postrouting-s 192.168.1.0/24-o eth0-j SNAT -- to-source 10.10.10.249
$ Ipt-t nat-a prerouting-s 192.168.1.0/24-I eth1-p tcp -- dport 80-j REDIRECT -- to-ports 3128
Iv. Start Squid during RHEL5 squid Configuration
1. # squid-k parse // check squid syntax
2. # squid-z // initialize squid and create Cache
3. #/etc/init. d/squid start
4. # ps-ef | grep squid
V. RHEL5 Squid client Configuration
Configure the gateway and DNS on XP without configuring a proxy. You can use IE to connect to the Internet.
I have answered and explained some questions about the RHEL5 Squid configuration process in this article, so I hope you can gain some insights through the author's explanation of the RHEL5 Squid configuration process.
- Set up the Samba server of ORACLE11g with RHELRHEL 5
- Rhelrhel ftp Server SETUP steps and Problem Analysis (1)
- RHELRHEL 5 is a perfect combination of FTP
- Problem Analysis: in this way, use RHELRHEL 4 to configure Postfix in four perfect steps
- Seven steps for RHEL to set up RHEL4 system Sendmail