На клиенте прописываю маршрут до нужного ресурса через линукс с проксей.
Настройки прокси:
Код: Выделить всё
acl manager proto cache_object
acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
acl operators src "/etc/squid3/operators_block.txt"
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
#http_access deny all
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access deny operators
http_access allow localhost
http_access allow all
#http_access deny all
http_port 3128 intercept
http_port 3129 tproxy
cache deny all
coredump_dir /var/spool/squid3
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
iptables:
Код: Выделить всё
# Generated by iptables-save v1.4.14 on Tue Feb 2 11:22:59 2016
*mangle
:PREROUTING ACCEPT [2783:307560]
:INPUT ACCEPT [25673:7155810]
:FORWARD ACCEPT [1010:326606]
:OUTPUT ACCEPT [23047:7271968]
:POSTROUTING ACCEPT [24057:7598574]
:DIVERT - [0:0]
-A PREROUTING -p tcp -m socket -j DIVERT
-A PREROUTING -p tcp -m tcp --dport 80 -j TPROXY --on-port 3129 --on-ip 0.0.0.0 --tproxy-mark 0x1/0x1
-A DIVERT -j MARK --set-xmark 0x1/0xffffffff
-A DIVERT -j ACCEPT
COMMIT
# Completed on Tue Feb 2 11:22:59 2016
# Generated by iptables-save v1.4.14 on Tue Feb 2 11:22:59 2016
*filter
:INPUT ACCEPT [250578:73336474]
:FORWARD ACCEPT [1798:529894]
:OUTPUT ACCEPT [227736:66644487]
COMMIT
# Completed on Tue Feb 2 11:22:59 2016
В файле /etc/squid3/operators_block.txt прописан мой IP, соответственно все должно блокироваться. Для проверки включал самое первое правило deny all - ничего не менялось.
При прописывании прокси в системе - все отрабатывает нормально.
В чем затык?