{"id":388595,"date":"2024-06-29T08:02:37","date_gmt":"2024-06-29T08:02:37","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=388595"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-06-29T08:02:37","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=388595","title":{"rendered":"<span>\u041f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u043c \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u0439 \u043f\u0440\u043e\u043a\u0441\u0438 Squid \u043d\u0430 FreeBSD 13.0<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c4d\/1c3\/e16\/c4d1c3e165b7fbb12620b56373883aa2.png\" width=\"570\" height=\"421\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c4d\/1c3\/e16\/c4d1c3e165b7fbb12620b56373883aa2.png\"\/><\/figure>\n<p>\u0425\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043f\u043e \u043f\u043e\u0434\u043d\u044f\u0442\u0438\u044e \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0433\u043e HTTP \u0438 HTTPS \u043f\u0440\u043e\u043a\u0441\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 Squid \u0441 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0435\u0439 \u0441\u0430\u0439\u0442\u043e\u0432 \u0438 \u0431\u0435\u0437 \u043f\u043e\u0434\u043c\u0435\u043d\u044b \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 \u043d\u0430 FreeBSD 13.0 RELEASE. \u041d\u0430 \u0425\u0430\u0431\u0440\u0435 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u043f\u043e\u0445\u043e\u0436\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u043a\u0441\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 Squid \u0441 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0435\u0439 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0438 \u0431\u0435\u0437 \u043f\u043e\u0434\u043c\u0435\u043d\u044b \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 \u043d\u0430 Linux. \u0420\u0435\u0448\u0438\u043b \u0430\u043a\u0442\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043d\u0430 \u0441\u0432\u0435\u0436\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u041e\u0421 FreeBSD 13.0 \u0438 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 \u0432\u0430\u043c\u0438.<\/p>\n<p>\u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u00abpeek-and-splice\u00bb, \u0441\u043a\u0432\u0438\u0434 \u0432\u044b\u0434\u0435\u0440\u0433\u0438\u0432\u0430\u0435\u0442 \u0438\u043c\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e SNI \u0438 \u043a\u043b\u0438\u0435\u043d\u0442 \u0434\u0430\u043b\u044c\u0448\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u043c. \u0422.\u0435. \u043d\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0434\u043c\u0435\u043d\u0430 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430. \u042d\u0442\u043e\u0442 \u0440\u0435\u0436\u0438\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u043a\u0441\u0438.<\/p>\n<p>\u0421\u0442\u0430\u0432\u0438\u0442\u044c Squid \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0437 \u043f\u043e\u0440\u0442\u043e\u0432, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432 \u0441\u0431\u043e\u0440\u043a\u0443, \u0442\u0430\u043a\u0436\u0435 \u0434\u043b\u044f \u0437\u0430\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u043d\u0430 \u043f\u043e\u0440\u0442 \u043f\u0440\u043e\u043a\u0441\u0438 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0439 \u0444\u0438\u043b\u044c\u0442\u0440 PF.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u043f\u043e\u0440\u0442\u044b:<\/p>\n<pre><code>portsnap fetch extract<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e\u0440\u0442\u044b \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 (\/usr\/ports), \u0442\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435:<\/p>\n<pre><code>portsnap fetch update<\/code><\/pre>\n<p>\u0421\u0442\u0430\u0432\u0438\u043c \u043f\u0430\u043a\u0435\u0442 libressl \u2014 \u0444\u043e\u0440\u043a openssl:<\/p>\n<pre><code>pkg install -y libressl rehash<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043f\u043e\u0434\u043c\u0435\u043d\u0443 OpenSSL \u043d\u0430 LibreSSL:<\/p>\n<pre><code>mv \/usr\/bin\/openssl \/usr\/bin\/openssl.old ln -s \/usr\/local\/bin\/openssl \/usr\/bin\/openssl openssl version<\/code><\/pre>\n<p>\u0412 \u0444\u0430\u0439\u043b\u0435 \/etc\/make.conf \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u043a\u0432\u0438\u0434\u0430:<\/p>\n<pre><code>DEFAULT_VERSIONS+=ssl=libressl OPTIONS_FILE_SET+=ECAP OPTIONS_FILE_SET+=GSSAPI_NONE OPTIONS_FILE_UNSET+=GSSAPI_BASE OPTIONS_FILE_UNSET+=TP_IPFW OPTIONS_FILE_SET+=TP_PF<\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u043f\u043e\u0440\u0442\u0430:<\/p>\n<pre><code>cd \/usr\/ports\/www\/squid<\/code><\/pre>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u043f\u043e\u0440\u0442\u0430:<\/p>\n<pre><code>make install clean BATCH=yes<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u0434\u043b\u044f SSL-bump&#8217;\u0438\u043d\u0433\u0430:<\/p>\n<pre><code>cd \/usr\/local\/etc\/squid \/usr\/local\/bin\/openssl req -new -newkey rsa:1024 -days 365 -nodes -x509 -keyout squidCA.pem -out squidCA.pem<\/code><\/pre>\n<p>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0444\u0430\u0439\u043b \u0431\u0430\u0437\u044b SSL:<\/p>\n<pre><code>\/usr\/local\/libexec\/squid\/security_file_certgen -c -s \/var\/log\/squid\/ssl_db -M 4MB<\/code><\/pre>\n<p>\u041f\u0440\u0438\u0432\u043e\u0434\u0438\u043c squid.conf \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0432\u0438\u0434\u0443:<\/p>\n<pre><code># # Squid configuration: #  # Set a hostname visible_hostname proxy.local  # Set nameservers (optional) dns_nameservers 1.1.1.1  # Local area network acl localnet src 192.168.0.0\/16  # Blocked domains acl blocked_urls url_regex -i \"\/usr\/local\/etc\/squid\/blocked_urls.acl\"  # Squid ports listening http_port 0.0.0.0:3128  http_port 0.0.0.0:3129 intercept https_port 0.0.0.0:3130 intercept ssl-bump connection-auth=off cert=\/usr\/local\/etc\/squid\/squidCA.pem  always_direct allow all sslproxy_cert_error allow all  acl blocked_https ssl::server_name \"\/usr\/local\/etc\/squid\/blocked_urls.acl\" acl step1 at_step SslBump1 ssl_bump peek step1  ssl_bump terminate blocked_https  ssl_bump splice all  sslcrtd_program \/usr\/local\/libexec\/squid\/security_file_certgen -s \/var\/log\/squid\/ssl_db -M 4MB  # Allowed ports  acl open_ports port 80# http acl open_ports port 443# https acl ssl_ports port 443 acl CONNECT method CONNECT  # # Access Permission configuration: #  # Deny requests to certain unsafe ports http_access deny !open_ports  # Deny CONNECT to other than secure ssl ports http_access deny CONNECT !ssl_ports  # Only allow cachemgr access from localhost http_access allow localhost manager http_access deny manager  # Deny access to localhost http_access deny to_localhost  # Deny access to domains http_access deny blocked_urls   # Allow access from local networks http_access allow localnet http_access allow localhost  # And finally deny all other access to this proxy http_access deny all  # Disk cache directory cache_dir ufs \/var\/squid\/cache 100 16 256  # Leave coredumps in the first cache dir coredump_dir \/var\/squid\/cache  # # Add any of your own refresh_pattern entries above these. # refresh_pattern ^ftp:144020%10080 refresh_pattern ^gopher:14400%1440 refresh_pattern -i (\/cgi-bin\/|\\?) 00%0 refresh_pattern .020%4320  # Errors pages error_directory \/usr\/local\/etc\/squid\/errors\/ru error_default_language ru<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b \u0441\u043e \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043d\u044b\u0445 \u0441\u0430\u0439\u0442\u043e\u0432:<\/p>\n<pre><code>vi \/usr\/local\/etc\/squid\/blocked_urls.acl .youtube.com .instagram.com<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433 \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043e\u0448\u0438\u0431\u043e\u043a:<\/p>\n<pre><code>squid -k parse<\/code><\/pre>\n<p>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043a\u044d\u0448:<\/p>\n<pre><code>squid -z<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0431\u0443\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u043a\u0441\u0438 \u0441\u0435\u0440\u0432\u0435\u0440:<\/p>\n<pre><code>\/usr\/local\/etc\/rc.d\/squid onestart<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0441\u0442\u0430\u0442\u0443\u0441 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0439 \u0441\u043b\u0443\u0436\u0431\u044b:<\/p>\n<pre><code>\/usr\/local\/etc\/rc.d\/squid onestatus sockstat -l | grep squid<\/code><\/pre>\n<p>\u041f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0439 \u0444\u0438\u043b\u044c\u0442\u0440 PF \u043a\u0430\u043a \u043c\u043e\u0434\u0443\u043b\u044c \u044f\u0434\u0440\u0430:<\/p>\n<pre><code>kldload pf kldstat | grep pf.ko<\/code><\/pre>\n<p>\u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0439 \u0444\u0438\u043b\u044c\u0442\u0440 PF:<\/p>\n<pre><code>pfctl -e<\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0432 PF \u0434\u043b\u044f \u0437\u0430\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u043d\u0430 \u043f\u043e\u0440\u0442 \u043f\u0440\u043e\u043a\u0441\u0438:<\/p>\n<pre><code>vi \/etc\/pf.conf rdr pass inet proto tcp from any to any port http -> 127.0.0.1 port 3129 rdr pass inet proto tcp from any to any port https -> 127.0.0.1 port 3130<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430:<\/p>\n<pre><code>pfctl -nvf \/etc\/pf.conf pfctl -f \/etc\/pf.conf<\/code><\/pre>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0439 \u0444\u0438\u043b\u044c\u0442\u0440 PF \u0434\u043b\u044f \u0437\u0430\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u043d\u0430 \u043f\u043e\u0440\u0442 \u0441\u043a\u0432\u0438\u0434\u0430, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e squid \u0434\u043e\u0441\u0442\u0443\u043f \u043d\u0430 \u0447\u0442\u0435\u043d\u0438\u0435 <strong>\/dev\/pf<\/strong>, \u0438\u043d\u0430\u0447\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u043e\u0448\u0438\u0431\u043a\u0443 \u0432 \u043b\u043e\u0433\u0435: <\/p>\n<pre><code>PfInterception PF open failed: (13) Permission denied.<\/code><\/pre>\n<p>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \/etc\/devfs.conf\u00a0 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043a\u043e\u043d\u0435\u0446 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code>own     pf      root:squid perm    pf      0640<\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c devfs:<\/p>\n<pre><code>\/etc\/rc.d\/devfs restart<\/code><\/pre>\n<p>\u041d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u043a\u0443 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u043c\u0438:<\/p>\n<pre><code>sysctl net.inet.ip.forwarding=1<\/code><\/pre>\n<p>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u0443\u0441\u043a \u0432 \u0444\u0430\u0439\u043b\u0435 \/etc\/rc.conf:<\/p>\n<pre><code>gateway_enable=\"YES\"# \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 sysctl net.inet.ip.forwarding=1 squid_enable=\"YES\"# \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043f\u0440\u043e\u043a\u0441\u0438 \u0441\u0435\u0440\u0432\u0435\u0440 Squid pf_enable=\"YES\"# \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0439 \u0444\u0438\u043b\u044c\u0442\u0440 PF pflog_enable=\"YES\"# \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 pflog<\/code><\/pre>\n<p>\u0414\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f:<\/p>\n<p>\u0418\u043d\u043e\u0433\u0434\u0430 \u0441\u043a\u0432\u0438\u0434 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u0442\u044c HTTPS \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u0445 \u0438 \u0432 \u043b\u043e\u0433\u0430\u0445 \u043c\u043e\u0433\u0443\u0442 \u0441\u044b\u043f\u0430\u0442\u044c\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u0438 \u0432\u0438\u0434\u0430:<\/p>\n<pre><code>SECURITY ALERT: Host header forgery detected on ... (local IP does not match any domain) IP)<\/code><\/pre>\n<p>\u041a\u0430\u043a \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u044d\u0448\u0438\u0440\u0443\u044e\u0449\u0438\u0439 DNS \u0440\u0435\u0437\u043e\u043b\u0432\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u044b \u0438 \u0441\u0430\u043c \u0441\u043a\u0432\u0438\u0434 \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435.<\/p>\n<p>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438:<\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/267851\/\">https:\/\/habr.com\/ru\/post\/267851\/<\/a>\u00a0<\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/354708\/\">https:\/\/habr.com\/ru\/post\/354708\/<\/a>\u00a0<\/p>\n<p><a href=\"https:\/\/www.ew8bak.ru\/2017\/02\/14\/freebsd-%D0%BF%D1%80%D0%BE%D0%B7%D1%80%D0%B0%D1%87%D0%BD%D1%8B%D0%B9-%D0%BF%D1%80%D0%BE%D0%BA%D1%81%D0%B8-squid-http-https\/\">https:\/\/www.ew8bak.ru\/2017\/02\/14\/freebsd-%D0%BF%D1%80%D0%BE%D0%B7%D1%80%D0%B0%D1%87%D0%BD%D1%8B%D0%B9-%D0%BF%D1%80%D0%BE%D0%BA%D1%81%D0%B8-squid-http-https\/<\/a><\/p>\n<blockquote>\n<p><a href=\"https:\/\/t.me\/timewebru\"><strong>\u041d\u043e\u0432\u043e\u0441\u0442\u0438, \u043e\u0431\u0437\u043e\u0440\u044b \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u0438 \u043a\u043e\u043d\u043a\u0443\u0440\u0441\u044b \u043e\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b Timeweb.Cloud &#8212; \u0432 \u043d\u0430\u0448\u0435\u043c Telegram-\u043a\u0430\u043d\u0430\u043b\u0435<\/strong><\/a> \u21a9<\/p>\n<\/blockquote>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/b5\/pj\/of\/b5pjofdoxth14ro-rjsrn7sbmiy.png\" alt=\"\u0416\u0430\u043c\u043a\u043d\u0443\u0442\u044c\" title=\"\u0416\u0430\u043c\u043a\u043d\u0443\u0442\u044c\" width=\"1560\" height=\"563\" data-src=\"https:\/\/habrastorage.org\/webt\/b5\/pj\/of\/b5pjofdoxth14ro-rjsrn7sbmiy.png\"\/><\/p>\n<div><figcaption><a href=\"https:\/\/timeweb.cloud\/?i=106909\"><em>\u0416\u0430\u043c\u043a\u043d\u0443\u0442\u044c<\/em><\/a><\/figcaption><\/div>\n<\/figure>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/586850\/\"> https:\/\/habr.com\/ru\/articles\/586850\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><\/figure>\n<p>\u0425\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043f\u043e \u043f\u043e\u0434\u043d\u044f\u0442\u0438\u044e \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0433\u043e HTTP \u0438 HTTPS \u043f\u0440\u043e\u043a\u0441\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 Squid \u0441 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0435\u0439 \u0441\u0430\u0439\u0442\u043e\u0432 \u0438 \u0431\u0435\u0437 \u043f\u043e\u0434\u043c\u0435\u043d\u044b \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 \u043d\u0430 FreeBSD 13.0 RELEASE. \u041d\u0430 \u0425\u0430\u0431\u0440\u0435 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u043f\u043e\u0445\u043e\u0436\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u043a\u0441\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 Squid \u0441 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0435\u0439 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0438 \u0431\u0435\u0437 \u043f\u043e\u0434\u043c\u0435\u043d\u044b \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 \u043d\u0430 Linux. \u0420\u0435\u0448\u0438\u043b \u0430\u043a\u0442\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043d\u0430 \u0441\u0432\u0435\u0436\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u041e\u0421 FreeBSD 13.0 \u0438 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 \u0432\u0430\u043c\u0438.<\/p>\n<p>\u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u00abpeek-and-splice\u00bb, \u0441\u043a\u0432\u0438\u0434 \u0432\u044b\u0434\u0435\u0440\u0433\u0438\u0432\u0430\u0435\u0442 \u0438\u043c\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e SNI \u0438 \u043a\u043b\u0438\u0435\u043d\u0442 \u0434\u0430\u043b\u044c\u0448\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u043c. \u0422.\u0435. \u043d\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0434\u043c\u0435\u043d\u0430 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430. \u042d\u0442\u043e\u0442 \u0440\u0435\u0436\u0438\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u043a\u0441\u0438.<\/p>\n<p>\u0421\u0442\u0430\u0432\u0438\u0442\u044c Squid \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0437 \u043f\u043e\u0440\u0442\u043e\u0432, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432 \u0441\u0431\u043e\u0440\u043a\u0443, \u0442\u0430\u043a\u0436\u0435 \u0434\u043b\u044f \u0437\u0430\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u043d\u0430 \u043f\u043e\u0440\u0442 \u043f\u0440\u043e\u043a\u0441\u0438 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0439 \u0444\u0438\u043b\u044c\u0442\u0440 PF.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u043f\u043e\u0440\u0442\u044b:<\/p>\n<pre><code>portsnap fetch extract<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e\u0440\u0442\u044b \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 (\/usr\/ports), \u0442\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435:<\/p>\n<pre><code>portsnap fetch update<\/code><\/pre>\n<p>\u0421\u0442\u0430\u0432\u0438\u043c \u043f\u0430\u043a\u0435\u0442 libressl \u2014 \u0444\u043e\u0440\u043a openssl:<\/p>\n<pre><code>pkg install -y libressl rehash<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043f\u043e\u0434\u043c\u0435\u043d\u0443 OpenSSL \u043d\u0430 LibreSSL:<\/p>\n<pre><code>mv \/usr\/bin\/openssl \/usr\/bin\/openssl.old ln -s \/usr\/local\/bin\/openssl \/usr\/bin\/openssl openssl version<\/code><\/pre>\n<p>\u0412 \u0444\u0430\u0439\u043b\u0435 \/etc\/make.conf \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u043a\u0432\u0438\u0434\u0430:<\/p>\n<pre><code>DEFAULT_VERSIONS+=ssl=libressl OPTIONS_FILE_SET+=ECAP OPTIONS_FILE_SET+=GSSAPI_NONE OPTIONS_FILE_UNSET+=GSSAPI_BASE OPTIONS_FILE_UNSET+=TP_IPFW OPTIONS_FILE_SET+=TP_PF<\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u043f\u043e\u0440\u0442\u0430:<\/p>\n<pre><code>cd \/usr\/ports\/www\/squid<\/code><\/pre>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u043f\u043e\u0440\u0442\u0430:<\/p>\n<pre><code>make install clean BATCH=yes<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u0434\u043b\u044f SSL-bump&#8217;\u0438\u043d\u0433\u0430:<\/p>\n<pre><code>cd \/usr\/local\/etc\/squid \/usr\/local\/bin\/openssl req -new -newkey rsa:1024 -days 365 -nodes -x509 -keyout squidCA.pem -out squidCA.pem<\/code><\/pre>\n<p>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0444\u0430\u0439\u043b \u0431\u0430\u0437\u044b SSL:<\/p>\n<pre><code>\/usr\/local\/libexec\/squid\/security_file_certgen -c -s \/var\/log\/squid\/ssl_db -M 4MB<\/code><\/pre>\n<p>\u041f\u0440\u0438\u0432\u043e\u0434\u0438\u043c squid.conf \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0432\u0438\u0434\u0443:<\/p>\n<pre><code># # Squid configuration: #  # Set a hostname visible_hostname proxy.local  # Set nameservers (optional) dns_nameservers 1.1.1.1  # Local area network acl localnet src 192.168.0.0\/16  # Blocked domains acl blocked_urls url_regex -i \"\/usr\/local\/etc\/squid\/blocked_urls.acl\"  # Squid ports listening http_port 0.0.0.0:3128  http_port 0.0.0.0:3129 intercept https_port 0.0.0.0:3130 intercept ssl-bump connection-auth=off cert=\/usr\/local\/etc\/squid\/squidCA.pem  always_direct allow all sslproxy_cert_error allow all  acl blocked_https ssl::server_name \"\/usr\/local\/etc\/squid\/blocked_urls.acl\" acl step1 at_step SslBump1 ssl_bump peek step1  ssl_bump terminate blocked_https  ssl_bump splice all  sslcrtd_program \/usr\/local\/libexec\/squid\/security_file_certgen -s \/var\/log\/squid\/ssl_db -M 4MB  # Allowed ports  acl open_ports port 80# http acl open_ports port 443# https acl ssl_ports port 443 acl CONNECT method CONNECT  # # Access Permission configuration: #  # Deny requests to certain unsafe ports http_access deny !open_ports  # Deny CONNECT to other than secure ssl ports http_access deny CONNECT !ssl_ports  # Only allow cachemgr access from localhost http_access allow localhost manager http_access deny manager  # Deny access to localhost http_access deny to_localhost  # Deny access to domains http_access deny blocked_urls   # Allow access from local networks http_access allow localnet http_access allow localhost  # And finally deny all other access to this proxy http_access deny all  # Disk cache directory cache_dir ufs \/var\/squid\/cache 100 16 256  # Leave coredumps in the first cache dir coredump_dir \/var\/squid\/cache  # # Add any of your own refresh_pattern entries above these. # refresh_pattern ^ftp:144020%10080 refresh_pattern ^gopher:14400%1440 refresh_pattern -i (\/cgi-bin\/|\\?) 00%0 refresh_pattern .020%4320  # Errors pages error_directory \/usr\/local\/etc\/squid\/errors\/ru error_default_language ru<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b \u0441\u043e \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043d\u044b\u0445 \u0441\u0430\u0439\u0442\u043e\u0432:<\/p>\n<pre><code>vi \/usr\/local\/etc\/squid\/blocked_urls.acl .youtube.com .instagram.com<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433 \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043e\u0448\u0438\u0431\u043e\u043a:<\/p>\n<pre><code>squid -k parse<\/code><\/pre>\n<p>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043a\u044d\u0448:<\/p>\n<pre><code>squid -z<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0431\u0443\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u043a\u0441\u0438 \u0441\u0435\u0440\u0432\u0435\u0440:<\/p>\n<pre><code>\/usr\/local\/etc\/rc.d\/squid onestart<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0441\u0442\u0430\u0442\u0443\u0441 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0439 \u0441\u043b\u0443\u0436\u0431\u044b:<\/p>\n<pre><code>\/usr\/local\/etc\/rc.d\/squid onestatus sockstat -l | grep squid<\/code><\/pre>\n<p>\u041f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0439 \u0444\u0438\u043b\u044c\u0442\u0440 PF \u043a\u0430\u043a \u043c\u043e\u0434\u0443\u043b\u044c \u044f\u0434\u0440\u0430:<\/p>\n<pre><code>kldload pf kldstat | grep pf.ko<\/code><\/pre>\n<p>\u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0439 \u0444\u0438\u043b\u044c\u0442\u0440 PF:<\/p>\n<pre><code>pfctl -e<\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0432 PF \u0434\u043b\u044f \u0437\u0430\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u043d\u0430 \u043f\u043e\u0440\u0442 \u043f\u0440\u043e\u043a\u0441\u0438:<\/p>\n<pre><code>vi \/etc\/pf.conf rdr pass inet proto tcp from any to any port http -> 127.0.0.1 port 3129 rdr pass inet proto tcp from any to any port https -> 127.0.0.1 port 3130<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430:<\/p>\n<pre><code>pfctl -nvf \/etc\/pf.conf pfctl -f \/etc\/pf.conf<\/code><\/pre>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0439 \u0444\u0438\u043b\u044c\u0442\u0440 PF \u0434\u043b\u044f \u0437\u0430\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u043d\u0430 \u043f\u043e\u0440\u0442 \u0441\u043a\u0432\u0438\u0434\u0430, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e squid \u0434\u043e\u0441\u0442\u0443\u043f \u043d\u0430 \u0447\u0442\u0435\u043d\u0438\u0435 <strong>\/dev\/pf<\/strong>, \u0438\u043d\u0430\u0447\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u043e\u0448\u0438\u0431\u043a\u0443 \u0432 \u043b\u043e\u0433\u0435: <\/p>\n<pre><code>PfInterception PF open failed: (13) Permission denied.<\/code><\/pre>\n<p>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \/etc\/devfs.conf\u00a0 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043a\u043e\u043d\u0435\u0446 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code>own     pf      root:squid perm    pf      0640<\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c devfs:<\/p>\n<pre><code>\/etc\/rc.d\/devfs restart<\/code><\/pre>\n<p>\u041d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u043a\u0443 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u043c\u0435\u0436\u0434\u0443 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u043c\u0438:<\/p>\n<pre><code>sysctl net.inet.ip.forwarding=1<\/code><\/pre>\n<p>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u0443\u0441\u043a \u0432 \u0444\u0430\u0439\u043b\u0435 \/etc\/rc.conf:<\/p>\n<pre><code>gateway_enable=\"YES\"# \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 sysctl net.inet.ip.forwarding=1 squid_enable=\"YES\"# \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043f\u0440\u043e\u043a\u0441\u0438 \u0441\u0435\u0440\u0432\u0435\u0440 Squid pf_enable=\"YES\"# \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0439 \u0444\u0438\u043b\u044c\u0442\u0440 PF pflog_enable=\"YES\"# \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 pflog<\/code><\/pre>\n<p>\u0414\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f:<\/p>\n<p>\u0418\u043d\u043e\u0433\u0434\u0430 \u0441\u043a\u0432\u0438\u0434 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u0442\u044c HTTPS \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u0445 \u0438 \u0432 \u043b\u043e\u0433\u0430\u0445 \u043c\u043e\u0433\u0443\u0442 \u0441\u044b\u043f\u0430\u0442\u044c\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u0438 \u0432\u0438\u0434\u0430:<\/p>\n<pre><code>SECURITY ALERT: Host header forgery detected on ... (local IP does not match any domain) IP)<\/code><\/pre>\n<p>\u041a\u0430\u043a \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u044d\u0448\u0438\u0440\u0443\u044e\u0449\u0438\u0439 DNS \u0440\u0435\u0437\u043e\u043b\u0432\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u044b \u0438 \u0441\u0430\u043c \u0441\u043a\u0432\u0438\u0434 \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435.<\/p>\n<p>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438:<\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/267851\/\">https:\/\/habr.com\/ru\/post\/267851\/<\/a>\u00a0<\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/354708\/\">https:\/\/habr.com\/ru\/post\/354708\/<\/a>\u00a0<\/p>\n<p><a href=\"https:\/\/www.ew8bak.ru\/2017\/02\/14\/freebsd-%D0%BF%D1%80%D0%BE%D0%B7%D1%80%D0%B0%D1%87%D0%BD%D1%8B%D0%B9-%D0%BF%D1%80%D0%BE%D0%BA%D1%81%D0%B8-squid-http-https\/\">https:\/\/www.ew8bak.ru\/2017\/02\/14\/freebsd-%D0%BF%D1%80%D0%BE%D0%B7%D1%80%D0%B0%D1%87%D0%BD%D1%8B%D0%B9-%D0%BF%D1%80%D0%BE%D0%BA%D1%81%D0%B8-squid-http-https\/<\/a><\/p>\n<blockquote>\n<p><a href=\"https:\/\/t.me\/timewebru\"><strong>\u041d\u043e\u0432\u043e\u0441\u0442\u0438, \u043e\u0431\u0437\u043e\u0440\u044b \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u0438 \u043a\u043e\u043d\u043a\u0443\u0440\u0441\u044b \u043e\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b Timeweb.Cloud &#8212; \u0432 \u043d\u0430\u0448\u0435\u043c Telegram-\u043a\u0430\u043d\u0430\u043b\u0435<\/strong><\/a> \u21a9<\/p>\n<\/blockquote>\n<figure class=\"full-width\">\n<div><figcaption><a href=\"https:\/\/timeweb.cloud\/?i=106909\"><em>\u0416\u0430\u043c\u043a\u043d\u0443\u0442\u044c<\/em><\/a><\/figcaption><\/div>\n<\/figure>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/586850\/\"> https:\/\/habr.com\/ru\/articles\/586850\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-388595","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/388595","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=388595"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/388595\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=388595"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=388595"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=388595"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}