What's new


ah nou nhy mou

Staff member
  • SikatPInoy Staff
  • medal 1
Redsocks is the tool that allows you to proxify(redirect) network traffic through a SOCKS4, SOCKS5 or HTTPs proxy server. It works on the lowest level, the kernel level (iptables). The other possible way is to use application level proxy, when the proxy client is implemented in the same language as an application is written in. Redsocks operates on the lowest system level, that’s why all running application don’t even have an idea that network traffic is sent through a proxy server, as a result it is called a transparent proxy redirector.

Getting Redsocks source code:Screenshot_20200103-151841_Chrome.jpg

yum update

cd /opt/

yum install git

git clone https://github.com/darkk/redsocks

cd redsocks/

Step 2 — Compiling Redsocks

yum group install "Development Tools"

yum install libevent libevent-devel

After installation try to compile Redsocksagain using the make command. If compilation succeed you should see the compiled binary file in the current directory.

1 2

[[email protected] redsocks]# ls -l redsocks -rwxr-xr-x 1 root root 415968 Jul 7 08:49 redsocks

Now you can copy the binary file to any folder defined in the $PATH variable, to be able to execute it without specifying a full path to Redsocks.

Step 3 — Setting Iptables Rules

# Create new chain

iptables -t nat -N REDSOCKS

iptables -t nat -A REDSOCKS -p tcp -j REDIRECT --to-ports 12345