OpenBSD PF & Squid - "No forward-proxy ports configured"

tertullian

Active Member
Nabend allerseits,

ich habe in meiner /var/squid/logs/cache.log folgende Meldung:
2014/10/25 23:24:21| Set Current Directory to /var/squid/cache
2014/10/25 23:24:21 kid1| Logfile: opening log /var/squid/logs/access.log
2014/10/25 23:24:21 kid1| WARNING: log name now starts with a module name. Use 'stdio:/var/squid/logs/access.log'
2014/10/25 23:24:21 kid1| Adaptation support is off.
2014/10/25 23:24:21 kid1| Store logging disabled
2014/10/25 23:24:21 kid1| DNS Socket created at [::], FD 8
2014/10/25 23:24:21 kid1| DNS Socket created at 0.0.0.0, FD 9
2014/10/25 23:24:21 kid1| Adding domain localdomain from /etc/resolv.conf
2014/10/25 23:24:21 kid1| Adding nameserver 192.168.1.1 from /etc/resolv.conf
2014/10/25 23:24:21 kid1| commBind: Cannot bind socket FD 14 to [::]:3127: (48) Address already in use
2014/10/25 23:24:21 kid1| commBind: Cannot bind socket FD 15 to 0.0.0.0:3127: (48) Address already in use
2014/10/25 23:24:21 kid1| HTCP Disabled.
2014/10/25 23:24:21 kid1| ERROR: No forward-proxy ports configured.
2014/10/25 23:24:21 kid1| ERROR: No forward-proxy ports configured.
2014/10/25 23:24:21 kid1| ERROR: No forward-proxy ports configured.
2014/10/25 23:24:21 kid1| ERROR: No forward-proxy ports configured.
2014/10/25 23:24:21 kid1| ERROR: No forward-proxy ports configured.
2014/10/25 23:24:21 kid1| ERROR: No forward-proxy ports configured.
2014/10/25 23:24:21 kid1| ERROR: No forward-proxy ports configured.
2014/10/25 23:24:21 kid1| ERROR: No forward-proxy ports configured.
2014/10/25 23:24:21 kid1| ERROR: No forward-proxy ports configured.
2014/10/25 23:24:21 kid1| ERROR: No forward-proxy ports configured.
2014/10/25 23:24:21 kid1| ERROR: No forward-proxy ports configured.
2014/10/25 23:24:21 kid1| ERROR: No forward-proxy ports configured.


Meine /etc/pf.conf:
# The external interfaces (connected to the ipv4 and ipv6 network)
ext_if="em0"

# The internal interface (connected to the local network)
int_if="em1"

## Options
set loginterface $ext_if
set optimization aggressive

# scrub incomming packets
match on egress scrub (no-df)

# Set the default policy to return RSTs or ICMPs for blocked traffic
set block-policy drop

# Ignore the loopback interface entirely
set skip on lo0

anchor "ftp-proxy/*"

pass in quick on $int_if inet proto tcp to any port ftp \
divert-to 127.0.0.1 port 8021

## Translation rules

# NAT traffic on the interface in the default egress interface group (to
# which the interface out of which the default route goes is assigned) from the
# local network
match out on egress inet from $int_if:network to any nat-to (egress)

## Filtering rules

# Default deny rule. which all blocked packets logged.
block log all
block in log on $ext_if all
antispoof log for egress

pass in quick on $int_if inet proto tcp from $ext_if to any port www divert-to 127.0.0.1 port 3127
pass out quick from 127.0.0.1 divert-reply

# Pass all traffic to and from the local network, using quick so that later
# rules are not evaluated if a packet match this. Some rulesets would restrict
# local traffic much further
pass quick on $int_if all

# Permit all traffic going out, keep state so that replies are
# automatically passed many rulesets would have many rules here,
# restricting traffic in an out on the external (egress) interface.
# (keep state is not needed on the newest version of pf)
pass out quick

Meine /etc/squid/squid.conf:
# Recommended minimum configuration:
#
# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
#acl localnet src 192.168.2.0/16 # RFC1918 possible internal network
acl localnet src fc00::/7 # RFC 4193 local private network range
acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines

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

# Your cache is running out of filedescriptors Solution !
max_filedesc 4096

#
# Recommended minimum Access Permission configuration:
#
# Only allow cachemgr access from localhost
http_access allow localhost manager
http_access deny manager

# Deny requests to certain unsafe ports
http_access deny !Safe_ports

# Deny CONNECT to other than secure SSL ports
http_access deny CONNECT !SSL_ports

# We strongly recommend the following be uncommented to protect innocent
# web applications running on the proxy server who think the only
# one who can access services on "localhost" is a local user
http_access deny to_localhost

# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#
# Example rule allowing access from your local networks.
# Adapt localnet in the ACL section to list your (internal) IP networks
# from where browsing should be allowed
http_access allow localnet
http_access allow localhost

# And finally deny all other access to this proxy
http_access deny all

# Squid normally listens to port 3128
http_port 3127 intercept

# default cache_mem 256 MB
cache_mem 100 MB

# Cache directory
# You can specify multiple cache_dir lines to spread the cache among different disk partitions.
# 20000 MB, 64 directories, 128 sub-directories for each directory
cache_dir ufs /var/squid/cache 20000 64 128

# Uncomment and adjust the following to add a disk cache directory.
#cache_dir ufs /var/squid/cache 200 16 256

# Added to footer of error pages.
cache_mgr abc@foo.net

visible_hostname firewall.local

#logformat <name> <format specification>
logformat lesbar %{%d.%m.%y %H:%M:%S}tl %>a %Ss %ru

# Log client request activities ('squid' is the name of the log format to use)
#access_log /var/squid/logs/access.log squid
access_log /var/squid/logs/access.log lesbar

# Log information about the cache's behavior
cache_log /var/squid/logs/cache.log

# Logs rotieren
logfile_rotate 2

# 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: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320


Für Tipps bin ich euch sehr dankbar.

Ich verstehe es leider nicht. :-(
http://comments.gmane.org/gmane.os.openbsd.misc/209698
 
Zurück
Oben