• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

Squid weist zurück

shawn307

Newbie
Hallo Leute,

ich habe mir einen Squid Server auf Open Suse installiert ( in einer VM) habe nun bei den ACLs meinen PC hinzugefügt und die verbindungen erlaubt,
nun hab ich den Squid Proxy bei den Proxy Einstellungen eingetragen und bekomme beim Versuch eine Website zu öffnen diese Meldung:

Fehler: Proxy-Server verweigert die Verbindung

Firefox wurde konfiguriert, einen Proxy-Server zu nutzen, der die Verbindung zurückweist.

Überprüfen Sie bitte, ob die Proxy-Einstellungen korrekt sind
Kontaktieren Sie bitte Ihren Netzwerk-Administrator, um sicherzustellen, dass der Proxy-Server
funktioniert


kann mir wer helfen und sagen woran das liege nkönnte? zuätzliche frage: Kann mir mal wer sagen was ich alles einstellen muss damit die speicherung im cache überhaupt richtig läuft ?

MFG
 

mfuhrmann

Newbie
Also deine Konfig würde sicher gut dabei helfen, dir zu helfen. Bitte poste mal deine Konfig.
In einer Standardkonfig sollte "der Cache" richtig "laufen". Was genau ist das Problem? Definiere "richtig".
 
OP
S

shawn307

Newbie
#
# Recommended minimum configuration:
#
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

# 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.0.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
acl myLap src 192.168.2.104-192.168.2.104/255.255.255.0

#
# Recommended minimum Access Permission configuration:
#
# Only allow cachemgr access from localhost
http_access allow manager localhost
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

# Allow localhost always proxy functionality
http_access allow myLap

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

# Squid normally listens to port 3128
http_port 3128

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

# Leave coredumps in the first cache dir
coredump_dir /var/cache/squid

# 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
deny_info http://www.google.de myLap
cache_effective_user squid
cache_effective_group nogroup


das hier ist meine config, vielleicht hab ich auch einfach irgendwas vergessen ?!
 

konqui

Hacker
Änder mal in der Squid.conf
Code:
...
acl localnet src 192.168.0.0/16
...
http_access allow localhost
http_access allow localnet
...
# Uncomment and adjust the following to add a disk cache directory.
cache_dir ufs /var/cache/squid 100 16 256
...
Danach:
rcsquid restart
rcsquid status (bitte in -Code- posten)
 
OP
S

shawn307

Newbie
squid.service - Squid caching proxy
Loaded: loaded (/lib/systemd/system/squid.service; disabled)
Active: active (running) since Thu, 14 Feb 2013 11:33:11 -0500; 10s ago
Process: 12516 ExecStop=/usr/sbin/squid -F -N -k shutdown -f /etc/squid/squid.conf (code=exited, status=0/SUCCESS)
Process: 12533 ExecStartPre=/usr/sbin/squid_cache_swap.sh (code=exited, status=0/SUCCESS)
Main PID: 12538 (squid)
CGroup: name=systemd:/system/squid.service
└ 12538 /usr/sbin/squid -F -N -sY -f /etc/squid/squid.conf

Feb 14 11:33:11 linux-3jrd squid[12538]: 2013/02/14 11:33:11| WARNING: Netmasks are deprecated. Please use CIDR masks instead.
Feb 14 11:33:11 linux-3jrd squid[12538]: WARNING: Netmasks are deprecated. Please use CIDR masks instead.
Feb 14 11:33:11 linux-3jrd squid[12538]: 2013/02/14 11:33:11| WARNING: IPv4 netmasks are particularly nasty when used to compare IPv6 to IPv4 ranges.
Feb 14 11:33:11 linux-3jrd squid[12538]: WARNING: IPv4 netmasks are particularly nasty when used to compare IPv6 to IPv4 ranges.
Feb 14 11:33:11 linux-3jrd squid[12538]: 2013/02/14 11:33:11| WARNING: For now we will assume you meant to write /24
Feb 14 11:33:11 linux-3jrd squid[12538]: 2013/02/14 11:33:11| aclIpParseIpData: WARNING: Netmask masks away part of the specified IP in '192.168.2.104-192.168.2.104/255.255.255.0'
Feb 14 11:33:11 linux-3jrd squid[12538]: WARNING: For now we will assume you meant to write /24
Feb 14 11:33:11 linux-3jrd squid[12538]: aclIpParseIpData: WARNING: Netmask masks away part of the specified IP in '192.168.2.104-192.168.2.104/255.255.255.0'
Feb 14 11:33:11 linux-3jrd squid[12538]: WARNING cache_mem is larger than total disk cache space!
Feb 14 11:33:11 linux-3jrd squid[12538]: 2013/02/14 11:33:11| WARNING cache_mem is larger than total disk cache space!


und nun ohne das ich was geändert habe ist der status wieder so:


squid.service - Squid caching proxy
Loaded: loaded (/lib/systemd/system/squid.service; disabled)
Active: failed (Result: exit-code) since Thu, 14 Feb 2013 11:34:11 -0500; 7s ago
Process: 12584 ExecStop=/usr/sbin/squid -F -N -k shutdown -f /etc/squid/squid.conf (code=exited, status=0/SUCCESS)
Process: 12538 ExecStart=/usr/sbin/squid -F -N $SQUID_START_OPTIONS -f /etc/squid/squid.conf (code=exited, status=1/FAILURE)
Process: 12533 ExecStartPre=/usr/sbin/squid_cache_swap.sh (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/squid.service

Feb 14 11:33:41 linux-3jrd squid[12538]: Adding domain localdomain from /etc/resolv.conf
Feb 14 11:33:41 linux-3jrd squid[12538]: Adding nameserver 192.168.60.2 from /etc/resolv.conf
Feb 14 11:33:41 linux-3jrd squid[12584]: 2013/02/14 11:33:41| WARNING: Netmasks are deprecated. Please use CIDR masks instead.
Feb 14 11:33:41 linux-3jrd squid[12584]: 2013/02/14 11:33:41| WARNING: IPv4 netmasks are particularly nasty when used to compare IPv6 to IPv4 ranges.
Feb 14 11:33:41 linux-3jrd squid[12584]: 2013/02/14 11:33:41| WARNING: For now we will assume you meant to write /24
Feb 14 11:33:41 linux-3jrd squid[12584]: 2013/02/14 11:33:41| aclIpParseIpData: WARNING: Netmask masks away part of the specified IP in '192.168.2.104-192.168.2.104/255.255.255.0'
Feb 14 11:33:41 linux-3jrd squid[12584]: 2013/02/14 11:33:41| WARNING cache_mem is larger than total disk cache space!
Feb 14 11:33:59 linux-3jrd squid[12584]: 2013/02/14 11:33:59| WARNING: Could not determine this machines public hostname. Please configure one or set 'visible_hostname'.
Feb 14 11:34:11 linux-3jrd squid[12584]: 2013/02/14 11:34:11| WARNING: Could not determine this machines public hostname. Please configure one or set 'visible_hostname'.
Feb 14 11:34:11 linux-3jrd squid[12584]: squid: No running copy
 

luwa

Member
shawn307 schrieb:
Process: 12538 ExecStart=/usr/sbin/squid -F -N $SQUID_START_OPTIONS -f /etc/squid/squid.conf (code=exited, status=1/FAILURE)

"Status=1" Der Squid läuft nicht.

Google Dich durch die Squid Howto's und baue Deine Config so um dass die ganzen Warnungen verschwinden. Ich schaue für sowas gerne ins Ubuntu-Wiki.
Wenn der Squid dann startet sollte es auch mit dem Firefox gehen, vorausgesetzt die VM kommt ins Internet. Direkt oder der Squid weiß das er den Wirt dazu benutzen muss.
 

spoensche

Moderator
Teammitglied
Code:
Feb 14 11:33:41 linux-3jrd squid[12584]: 2013/02/14 11:33:41| aclIpParseIpData: WARNING: Netmask masks away part of the specified IP in '192.168.2.104-192.168.2.104/255.255.255.0'

Die Angabe deiner IP Adresse stimmt nicht. Squid erwartet sie in der CIDR Notation.

PS:
Für einen User ist ein eigener Proxy ein wenig übertrieben. Evtl. wäre es sinnvoller wenn du einen public Proxy verwendest.
 
Oben