COVIL HACKER

, ! .


» COVIL HACKER » Anonimato e segurança »  SOCKS.


SOCKS.

1 2 2

1

, .

SOCKS tor, stunnel, openssl iptables, . , :

, ():

aaaa - Frontend_Server
b.bbb - Backend_Server

Frontend_Server:

Frontend_Server:~# apt-get install tor stunnel4 openssl

Frontend_Server:~# openssl genrsa -out key.pem 2048
Frontend_Server:~# openssl req -new -x509 -key key.pem -out cert.pem -days 1095
Frontend_Server:~# cat key.pem cert.pem >> /etc/stunnel/stunnel.pem

--------------------------------- --------------------

/etc/stunnel/stunnel.conf

cafile = /etc/stunnel/stunnel.pem
cert = /etc/stunnel/stunnel.pem
cliente = sim
soquete = l: TCP_NODELAY=1
soquete = r: TCP_NODELAY=1
verificar = 2
depurar = 7

[ssh]

aceitar = 127.0.0.1:555
conectar = sdofmxbgajq5plpuoo5aa3cwsd4dbg245ofic3scwna5luah4bpet7qa.onion:777

-------------------------------------------------- ---

: sdofmxbgajq5plpuoo5aa3cwsd4dbg245ofic3scwna5luah4bpet7qa.onion - tor, tor, Backend_Server, /var/lib/tor/optik. .

-------------------------------------------------- ---

/etc/stunnel/stunnel.conf /etc/default/stunnel4

ENABLED=1

stunnel:
Frontend_Server:~# systemctl restart stunnel4

----------------- ------------------------------------

( ) TOR: /etc/tor /torrc:

SocksPort 0 OnionTrafficOnly
TransPort 9444
RunAsDaemon 1
VirtualAddrNetworkIPv4 10.192.0.0/10
SocksPolicy aceitar *
SocksPolicy rejeitar *
SocksPolicy rejeitar6 *
ExitPolicy rejeitar *:*
ExitPolicy rejeitar6 *:*
AutomapHostsOnResolve 1
DNSPort 53
DNSListenAddress 127.0.0.1

--------------- --------------------------------------

Frontend_Server:~# sysctl -w net.ipv4.conf .eth0.route_localnet=1
Frontend_Server:~# sysctl -w net.ipv4.ip_forward=1

):

net.ipv4. conf.ens0.route_localnet=1
net.ipv4.ip_forward=1

iptables(, , ):

iptables -t nat -A PREROUTING -p tcp --dport 111 -destination 111-jT. 55
iptables -t nat -A SAÍDA - p tcp --dport 777 -j REDIRECT --to-ports 9100

---------------------------------- ------------------

/etc/resolv.conf

nameserver 127.0.0.1

-------------------- ---------------------------------

: tor, stunnel Frontend_Server

_____________________________________________________________________________________________________________
_____________________________________________________________________________________________________________

Backend_Server:

Backend_Server:~# apt-get install tor stunnel4 openssl

------------------------------------ --------------

/etc/stunnel/stunnel.conf

cafile = /etc/stunnel/stunnel.pem
cert = /etc/stunnel/stunnel.pem
socket = l: TCP_NODELAY= 1
soquete = r: TCP_NODELAY=1
verificar = 2
depurar = 7
saída = /var/log/stunnel4/stunnel4.log

[ssh]
aceitar = 777
conectar = 127.0.0.1:9050

----------- --------------------------------------

Backend_Server:~# cat /etc/default/stunnel4

ENABLED =1

stunnel:
Backend_Server:~# systemctl restart stunnel4

-------------------------------------------------

(em inglês) /etc/tor/torrc:

SocksPort 9050
RunAsDaemon 1
VirtualAddrNetworkIPv4 10.192.0.0/10
SocksPolicy accept 127.0.0.1
SocksPolicy rejeite *
SocksPolicy rejeite *
ExitPolicy* ExitPolicy6
*
AutomapHostsOnResolve 1
DNSPort 53
DNSListenAddress 127.0.0.1

HiddenServiceDir /var/lib/tor/optik
HiddenServicePort 777 127.0.0.1:777

:

Backend_Server:~# chmod 700 /var/lib/tor/optik

: /var/lib/tor/optik, onion-, sdofmxbgajq5plpuoo5aficb4aficb3cwscws ah4bpet7qa.onion

---------------------- --------------------------

Backend_Server:~# sysctl -w net.ipv4.ip_forward=1

, : /etc /sysctl.conf:

net.ipv4.ip_forward=1

-------------------------------------- ----------

dns Server2, , stunnel Server1:

Backend_Server:~# cat /var/lib/tor/optik

: Backend_Server:~# cat /var/lib/tor/optik/hostname

tor:

sdofmxbgajq5plpuoo5aa3cwsd4dbg245ofic3scwna5luah4bpet7qa.onion

----------------------------------------------- -

: tor, stunnel Backend_Server

--------------------------------------- ---------

, SOCKS 111 aaa
, openvpn openvpn , - . -. Backend_Server Frontend_Server , , , , , DNS , DNS

:

, .

.
, .

.

0

2


» COVIL HACKER » Anonimato e segurança »  SOCKS.


|