FREEBSD6.0RELEASE+SQUID+SOCKS5 Server Setup Notes _unix Linux

Source: Internet
Author: User
Tags install perl nameserver
Set up this server, so that the client through the setting Proxy server squid to browse the Web page, through the proxy server SOCKS5 to use QQ, MSN, Securities and other services, the following brief introduction of the server's erection process.

I. Installation of Freebsd6.0release

Download the latest version of Freebsd6.0release from Ftp://ftp.freebsd.org/pub/FreeBSD/torrents/6.0-RELEASE and choose to minimize the installation (open FTP and SSH service during installation).

Network information:
Network Segment-> 192.168.10.0/24
FXP0-> Intranet Network card 192.168.10.254
EM0-> External network card 218.104.52.X/32

1, select the minimum installation when choosing a package.

2, edit inetd.conf when the FTP and Telnet service.
The other is the default installation, specific reference to this, after installation restart the machine.

Second, configure FreeBSD

1, Configuration/etc/rc.conf:
Hostname= "Jifangproxy.jscpu.com"
Defaultrouter= "218.104.52.x"
ifconfig_em0= "inet 218.104.52.x netmask 255.255.255.248"
ifconfig_fxp0= "inet 192.168.10.254 netmask 255.255.255.0"
Inetd_enable= "YES"
Kern_securelevel_enable= "NO"
Linux_enable= "YES"
Nfs_reserved_port_only= "YES"
Sendmail_enable= "NONE"
Sshd_enable= "YES"
Usbd_enable= "NO"

2, Configuration/etc/resolv.conf:
Domain jscpu.com
NameServer 218.104.48.106
NameServer 221.6.4.66

3, put the CD into the CD-ROM drive, install ports and SRC
#/usr/sbin/sysinstall
Then select Configure-->distributions, and then use the SPACEBAR to select SRC and Ports Two, point install, restart the machine after the installation is complete.

Third, configure the kernel

# cd/usr/src/sys/i386/conf
# CP GENERIC Funpower
# EE Funpower
The kernel is configured differently depending on the server.
After editing the Funpower, start compiling the installation kernel:
#/usr/sbin/config Funpower
#cd. /compile/funpower
#make Cleandepend
#make depend
#make
#make Intall
Reboot the machine after the compile installation completes.

Iv. Installation of Squid service

1, install Perl (freebsd5.4 after installing Perl before installing squid)

Download the perl-5.6.2.tar.gz from the http://www.cpan.org/authors/id/R/RG/RGARCIA/and copy it to/usr/ports/distfiles, and then:

# CD/USR/PORTS/LANG/PERL5
# make Install

2. Download and install Squid

From http://www.squid-cache.org/Versions/v2/2.5/download Squid The latest version of Squid-2.5.stable12.tar.gz, uploaded to the server directory via FTP.

< Installation >
# Cd/home/funpower
# tar ZXVF squid-2.5.stable12.tar.gz
# CD Squid-2.5.stable7
#./configure–prefix=/usr/local/squid
# make
# make Install

< Configure Squid profile >
# CD/USR/LOCAL/SQUID/ETC
# EE squid.conf
Change the following in the configuration file:
Http_port 3128//56 Line
CACHE_MEM 128 MB//490 Line
Cache_dir Ufs/usr/local/squid/cache 1024 16 256//705 Line
Cache_access_log/dev/null//712
Cache_log/dev/null//720
Cache_store_log None//730
The following items are included in the configuration file:
ACL Web src 192.168.10.254///on 1830 line ACL all src 0.0.0.0/0.0.0.0 before this line joins
Http_access allow Web//On 1890 lines of Http_access deny all this line before joining
Add the following four lines at the beginning of the configuration file:
Visible_hostname jifangproxy.jscpu.com
Cache_mgr admin@jifangproxy.jscpu.com
Cache_effective_user Squid
Cache_effective_group Squid

< add user and group and directory permissions to modify >
# PW Groupadd Squid
# PW AddUser squid–g squid–s/nonexistent
# Mkdir/usr/local/squid/cache
# Chown–r Squid/usr/local/squid/cache
# Chgrp–r Squid/usr/local/squid/cache
# Chown–r Squid/usr/local/squid/var/logs
# Chgrp–r Squid/usr/local/squid/var/logs

< Create initial cache directory >
#/usr/local/squid/sbin/squid–z
Run Test squid, if there is no error after running errors, with the top command to see the squid process, indicating the installation success:
# Cd/usr/local/squid/sbin
#./squid

< Create squid startup script (start with System) >
# ee/etc/rc.local
Add the following line, and then save the exit:
/usr/local/squid/sbin/squid

Reboot the server.

V. Installation of SOCKS5 Services

1. Download and install SOCKS5

Download the socks5-v1.0r11.tar.gz from the North Sky, size 401.093KB (This is what I provide), and then copy to the server via FTP, and then:

# Cd/home/funpower
# CP Socks5-v1.0r11.tar.gz/usr/ports/distfiles

< view distinfo>
# CD/USR/PORTS/NET/SOCKS5
#more Distinfo
The display is as follows:
MD5 (socks5-v1.0r11.tar.gz) = 9d6db7d3c425bbafb8c8d67e128eedfe
SIZE (socks5-v1.0r11.tar.gz) = 401093
To see if size is the same size as the one you just downloaded (401.093KB)

< start installation >
# CD/USR/PORTS/NET/SOCKS5
# make Install

2. Configure SOCKS5

# CD/USR/LOCAL/ETC
# EE socks5.conf
< content as follows >
Auth--
Permit--192.168. - - -
Set Socks5_noident
Set Socks5_v4support

Save exit and reboot the server.

Then through the QQ test connection Test your server HTTP 3128 ports and SOCKS5 1080 ports.
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.