How to configure the socks5 proxy in Linux

Source: Internet
Author: User


Introduction:

In Linux, there are a variety of proxies available, such as the most commonly used Squid, which is an http/https proxy and can also proxy ftp requests, but it is actually an HTTP proxy, it is not an ftp proxy, but it can process ftp proxy requests in the same way as the browser processes ftp requests. Some programs can only be set to use socks proxy, like CuteFTP; also, Wu-FTP can only be set to use ftp Proxy (the ftp Proxy here is a standard ftp Proxy, not the way Squid supports ); ICQ 2000 can accept both https proxy and Socks proxy; NetVampire can accept standard HTTP (GET/POST) proxy (supported by Squid), and HTTP (CONNECT) proxy) proxy (also supported by Squid ).

In order to use Cute-FTP, in addition to the IP disguised method, Socks proxy is required. Now let's look at the process of configuring Socks5:

1. Download an object

Download the latest socks5 source file from www.socks.nec.com to the/tmp directory.
Socks5-v1.0r11.tgz

2. Compile and install the firewall (The firewall should be directly connected to the internet, which is a dual-host machine with two NICs installed, assuming the Intranet segment is 192.168.0.0/24)

Cd/tmp
Tar-xvfz socks5-v1.0r11.tgz

D/tmp/socks5-v1.0r11
./Configure -- with-threads
Make
Make install

3. Configuration File

/Etc/socks5.conf
#/Etc/socks5.conf
Set SOCKS5_MAXCHILD 3
Set SOCKS5_NOIDENT
Set SOCKS5_TIMEOUT 5

Interface 192.168.0.-eth1
Auth 192.168.0.-u
Permit u-192.168.0.---jephe
Permit u-192.168.0.---jack
Deny -------

4. configuration file/etc/socks5.passwd

#/Etc/socks5.passwd
Jephe password_of_jephe_is_here
Jack password_of_jephe_is_here

5. Start the test

/Usr/local/bin/socks5-f-s
If the following information is displayed, the test is successful.
18210: Socks5 starting at Mon Dec 14 18:23:45 1998 in normal mode

Then exit socks5 and start running it in background mode:

6. Run

/Usr/local/bin/socks5-t-s 2>/var/log/socks5

7. Add it to/etc/rc. d/rc. local.

Echo "/usr/local/bin/socks5-t-s 2>/var/log/socks5">/etc/rc. d/rc. local

END.

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.