• DevOps
    Case Study

    How we built a resilient multi-account, multi-cloud solution for a Health Tech service provider!

    READ CASESTUDY
    icon

    24/7 DevOps as a Service

    Round-the-clock DevOps for uninterrupted efficiency.

    icon

    Infrastructure as a Code

    Crafting infrastructure with ingenious code.

    icon

    CI/CD Pipeline

    Automated CI/CD pipeline for seamless deployments.

    icon

    DevSecOps

    Integrated security in continuous DevOps practices.

    icon

    Hire DevOps Engineers

    Level up your team with DevOps visionaries.

    icon

    Consulting Services

    Navigate success with expert DevOps consulting.

  • TechOps
    Case Study

    How we built a scalable Odoo solution for a Travel Tech service provider!

    READ CASESTUDY

    WEB HOSTING SUPPORT

    icon

    HelpDesk Support

    Highly skilled 24/7 HelpDesk Support

    icon

    Product Support

    Boost your product support with our expertise.

    MANAGED SERVICES

    icon

    Server Management

    Don’t let server issues slow you down. Let us manage them for you.

    icon

    Server Monitoring

    Safeguard your server health with our comprehensive monitoring solutions.

    STAFF AUGMENTATION

    icon

    Hire an Admin

    Transform your business operations with our expert administrative support.

    icon

    Hire a Team

    Augment your workforce with highly skilled professionals from our diverse talent pool.

  • CloudOps
    Case Study

    How we helped a Private Deemed University in India, save US $3500/m on hosting charges!

    READ CASESTUDY
    icon

    AWS Well Architected Review

    Round-the-clock for uninterrupted efficiency

    icon

    Optimize

    Efficient CloudOps mastery for seamless cloud management

    icon

    Manage

    Automated CI/CD pipeline for seamless deployments

    icon

    Migrate

    Upgrade the journey, Migrate & Modernize seamlessly

    icon

    Modernize

    Simplify compliance complexities with our dedicated services

    icon

    FinOps as a Service

    FinOps as a Service

  • SecOps
    Case Study

    How we built a scalable Odoo solution for TravelTech service provider!

    READ CASESTUDY
    icon

    VAPT

    Vulnerability Assessment and Penetration Testing

    icon

    Source Code Review

    Ensuring source code security ans safe practices to reduce risks

    icon

    Security Consultation

    On demand services for improving server security

    icon

    System Hardening

    Reduced vulnerability and proactive protection

    icon

    Managed SoC

    Monitors and maintains system security. Quick response on incidents.

    icon

    Compliance as a Service

    Regulatory compliance, reduced risk

  • Insights
    Case Study

    How we helped a Private Deemed University in India, save US $3,500/m on hosting charges!

    READ CASESTUDY
    icon

    Blog

    Explore our latest articles and insights

    icon

    Case Studies

    Read about our client success stories

    icon

    Flipbook

    Explore our latest Flipbook

    icon

    Events

    Join us at upcoming events and conferences

    icon

    Webinars

    Watch our educational webinar series

  • Our Story
  • Contact Us

Interested to collaborate?

Get in touch with us!

Ready to elevate your business with certified cloud expertise? Contact us today to learn how our team can help you leverage cloud technology to drive growth, streamline operations, and enhance security.

  • AWSAWS
  • Azure CloudAzure Cloud
  • Google CloudGoogle Cloud
  • Akamai CloudAkamai Cloud
  • OVHOVH
  • Digital OceanDigital Ocean
  • HetznerHetzner
  • Kubernetes Consultancy Services
  • K8s & Cloud native Solutions
  • 24/7 Infrastructure Monitoring
  • DevOps as a Service
  • Cloud CI/CD Solutions
  • White Labeled MSP Support
  • Our story
  • Life@SupportSages
  • Insights
  • Careers
  • Events
  • Contact Us

Connect with us!


LinkedInFacebookXInstagramYouTube

aws partneraws advanced partner
SupportSages

Copyright © 2008 – 2026 SupportSages Pvt Ltd. All Rights Reserved.
Privacy PolicyLegal TermsData ProtectionCookie Policy

Socks5 proxy server setup with 3proxy

Glenn Max

  • 4 min read
Socks5 proxy server setup with 3proxy

Generating audio, please wait...

A proxy server is a dedicated computer or a software system running on a computer that acts as an intermediary between an endpoint device, such as a computer, and another server from which a user or client is requesting a service. The proxy server may exist in the same machine as a firewall server or it may be on a separate server, which forwards requests through the firewall.

When a proxy server receives a request for an Internet resource (such as a Web page), it looks in its local cache of previous pages. If it finds the page, it returns it to the user without needing to forward the request to the Internet. If the page is not in the cache, the proxy server, acting as a client on behalf of the user, uses one of its own IP addresses to request the page from the server out on the Internet. When the page is returned, the proxy server relates it to the original request and forwards it to the user.

Socks 4 and 5 proxies provide proxy service for UDP data and DNS lookup operations in addition to Web traffic. Some proxy servers offer both Socks protocols.

Installing and configuring proxy

For this setup we are using a Centos 7 based machine, the commands may vary depending on the base OS used.

Installing required packages for compiling the source code.

yum install gcc make -y
yum install wget -y

Making a temporary directory.

mkdir /tmp/proxy
cd /tmp/proxy

Downloading the source code and extracting the package.

wget http://3proxy.ru/0.7.1.2/3proxy-0.7.1.2.tgz
tar -xvzf 3proxy-0.7.1.2.tgz

Navigate to the extracted folder.

cd 3proxy/

Compile and installing 3proxy.

make -f Makefile.Linux
make -f Makefile.Linux install

Creating a directory for installing the config file.

mkdir /usr/local/etc/3proxy/config

Installing the config file.

/usr/bin/install -m 644 scripts/3proxy.cfg scripts/add3proxyuser.sh /usr/local/etc/3proxy/config

Copying the config file to the parent directory.

cp /usr/local/etc/3proxy/config/3proxy.cfg /usr/local/etc/3proxy/3proxy.cfg

Creating a directory ‘bin’ for the executable file.

mkdir /usr/local/etc/3proxy/bin

Change the directory and copy the binary files to the bin directory.

cd src/
cp -af 3proxy countersutil dighosts ftppr icqpr msnpr mycrypt pop3p proxy smtpp socks tcppm udppm /usr/local/etc/3proxy/bin

Creating a directory for a log file.

mkdir -p /usr/local/etc/3proxy/log/

Change the current working directory to the 3proxy installation directory.

cd /usr/local/etc/3proxy/

Creating an authorized user login for password-based authentication.

Promotional banner

echo username:`/usr/local/etc/3proxy/bin/mycrypt $$ password` >> /usr/local/etc/3proxy/passwd

Open the 3proxy configuration file and edit the code similar to the one given below.

vi 3proxy.cfg

The config file is given below.

#!/usr/local/bin/3proxy
daemon
pidfile /usr/local/etc/3proxy/3proxy.pid

nscache 65536
nserver 127.0.0.1

config /usr/local/etc/3proxy/3proxy.cfg
monitor /usr/local/etc/3proxy/3proxy.cfg
monitor /usr/local/etc/3proxy/counters
monitor /usr/local/etc/3proxy/passwd
monitor /usr/local/etc/3proxy/bandlimiters

log /usr/local/etc/3proxy/log/log D
rotate 60

counter /usr/local/etc/3proxy/3proxy.3cf
users $/usr/local/etc/3proxy/passwd
include /usr/local/etc/3proxy/counters
include /usr/local/etc/3proxy/bandlimiters

deny * * 127.0.0.1

#socks5#
auth strong
allow username
flush
socks

Here socks proxy is running with default port 1080, the custom port can be enabled for proxy service by adding a flag ‘-p’ along with port number i.e. socks -p1880 .

Password-based authentication is buggy and it is always advised to use IP based authentication which will make the proxy server accessible only from predefined IP.

IP based authentication can be enabled in 3proxy by adding required IP after changing auth value to iponly in 3proxy configuration file. A sample configuration is given below for reference,

#socks5#
auth iponly
##allowing IP eg. allow * <IP>
allow * 1.2.3.4
##deny all connections from other IP to the proxy port 
deny * *
flush
socks

Here the authentication is switched to IP based and the proxy will accept the request from this IP only all other requests from other IP’s will be denied.

Start the proxy by executing the following command.

3proxy

Verify that 3proxy service is started and the assigned port is listening for incoming connection using the following commands.

ps aux | grep 3proxy
netstat -tuplan | grep 3proxy

The sample output of these commands will be,

# ps aux | grep 3proxy
root 5748 0.0 0.5 77324 4336 ? Ssl 13:42 0:00 3proxy

# netstat -tuplan | grep 3proxy
tcp 0 0 0.0.0.0:1880 0.0.0.0:* LISTEN 5748/3proxy

Managing 3proxy
To start the proxy execute the command:

3proxy

To stop the proxy, kill the process after grepping the PID.

ps aux | grep 3proxy
kill -9 PID

Verifying the proxy service

This method works only in 3proxy setup with IP based authentication.
Proxy service can be verified using the command from the IP addresses which are whitelisted in the 3proxy configuration file.

curl<space>--socks5<space>ipaddress of proxy server:port of proxy server<space>url

For example

curl –socks5 1.2.3.4:1080 google.com

 

Server Management

  • Linux
  • server
Promotional banner
Promotional banner
Socks5 proxy server setup with 3proxy

Adding DMARC record in cPanel/WHM

Adding DMARC record in cPanel/WHM
  • cPanel
logo

Automated Start/Stop of EC2 instances using Lambda and CloudWatch

Automated Start/Stop of EC2 instances using Lambda and CloudWatch
  • Linux
logo

Creating an AWS instance

Creating an AWS instance
  • Sever management
logo

Posts by Glenn Max

Glenn Max