The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]



"Squid + PF"
Версия для распечатки Пред. тема | След. тема
Форум Настройка Squid, Tor и прокси серверов
Исходное сообщение [ Отслеживать ]

"Squid + PF" +/
Сообщение от kamerad (ok), 07-Окт-16, 14:40 
Есть стенд. Установил включил Squid. Он работает.
Как только настраиваю и включаю PF, squid перестает работать и более не стартует.


Настройки сквида дефолтные поправил только:
# Squid normally listens to port 3128
http_port 3128
http_port 127.0.0.1:3128 intercept

pf.conf

ext_if = "hn0" # macro for external interface
int_if = "hn1" # macro for internal interface

nat on $ext_if from $int_if:network to any -> ($ext_if)
#nat on $ext_if from !($ext_if)->($ext_if:0)
rdr on $int_if inet proto tcp from any to any port www -> 127.0.0.1 port 3128

tcp_services = "{ ssh, smtp, domain, http, https, 821, 1723, nfsd, rpcbind }"
ftp_ports = "{ ftp, ftp-data }"
udp_services = "{ domain, ntp, rpcbind, 821, 1723, nfsd }"
block in all
pass quick inet proto gre to any keep state
pass quick inet proto { tcp, udp } from any to any port $ftp_ports keep state
pass quick inet proto { tcp, udp } from any to any port > 18000 keep state
pass quick inet proto udp to any port $udp_services keep state
pass quick inet proto tcp to any port $tcp_services keep state
pass quick inet proto icmp from any to any
pass out on $ext_if inet proto udp from any to any port 33433 >< 33626 keep state
pass quick inet proto { tcp, udp } from any to port { nfsd, rpcbind } keep state
# mountd -p 883
pass quick inet proto { tcp, udp } from any to port 883 keep state
# rpc.lockd -p 884
pass quick inet proto { tcp, udp } from any to port 884 keep state
# rpc.statd -p 885
pass quick inet proto { tcp, udp } from any to port 885 keep state
block in log all

rc.conf

hostname="BSD"
sshd_enable="YES"
ntpd_enable="YES"
ifconfig_hn0="inet 172.17.9.25 255.255.254.0"
ifconfig_hn1="inet 192.168.0.1 255.255.255.0"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
defaultrouter="172.17.8.1"
inetd_enable="YES"
ftpd_enable="YES"
named_enable="YES"
sendmail_enable="YES"
dhcpd_enable="YES"
dhcpd_ifaces="hn1"
squid_enable="YES"
pf_enable="YES"                 # Enable PF (load module if required)
pf_rules="/etc/pf.conf"         # rules definition file for pf
pf_flags=""                     # additional flags for pfctl startup
pflog_enable="YES"              # start pflogd(8)
pflog_logfile="/var/log/pflog"  # where pflogd should store the logfile
pflog_flags=""                  # additional flags for pflogd startup
gateway_enable="YES"

/etc/sysctl.conf

sysctl -w net.inet.ip.forwarding=1

логи сквида:

2016/10/07 14:28:33 kid1| Set Current Directory to /var/squid/cache
2016/10/07 14:28:33 kid1| Starting Squid Cache version 3.5.20 for i386-portbld-freebsd10.1...
2016/10/07 14:28:33 kid1| Service Name: squid
2016/10/07 14:28:33 kid1| Process ID 1041
2016/10/07 14:28:33 kid1| Process Roles: worker
2016/10/07 14:28:33 kid1| With 113562 file descriptors available
2016/10/07 14:28:33 kid1| Initializing IP Cache...
2016/10/07 14:28:33 kid1| DNS Socket created at [::], FD 6
2016/10/07 14:28:33 kid1| DNS Socket created at 0.0.0.0, FD 8
2016/10/07 14:28:33 kid1| Adding nameserver 127.0.0.1 from /etc/resolv.conf
2016/10/07 14:28:33 kid1| Adding domain test.dom from /etc/resolv.conf
2016/10/07 14:28:33 kid1| Logfile: opening log daemon:/var/log/squid/access.log
2016/10/07 14:28:33 kid1| Logfile Daemon: opening log /var/log/squid/access.log
2016/10/07 14:28:33 kid1| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
2016/10/07 14:28:33 kid1| Store logging disabled
2016/10/07 14:28:33 kid1| Swap maxSize 0 + 262144 KB, estimated 20164 objects
2016/10/07 14:28:33 kid1| Target number of buckets: 1008
2016/10/07 14:28:33 kid1| Using 8192 Store buckets
2016/10/07 14:28:33 kid1| Max Mem  size: 262144 KB
2016/10/07 14:28:33 kid1| Max Swap size: 0 KB
2016/10/07 14:28:33 kid1| Using Least Load store dir selection
2016/10/07 14:28:33 kid1| Set Current Directory to /var/squid/cache
2016/10/07 14:28:33 kid1| Finished loading MIME types and icons.
2016/10/07 14:28:33 kid1| HTCP Disabled.
2016/10/07 14:28:33| pinger: Initialising ICMP pinger ...
2016/10/07 14:28:33| pinger: ICMP socket opened.
2016/10/07 14:28:33| pinger: ICMPv6 socket opened

Ответить | Правка | Cообщить модератору

Оглавление
Squid + PF, kamerad, 07-Окт-16, 14:40  [смотреть все]
Форумы | Темы | Пред. тема | След. тема



Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру