Toon posts:

[SQUID] Proxy zonder client instellingen

Pagina: 1
Acties:
  • 102 views sinds 30-01-2008
  • Reageer

Verwijderd

Topicstarter
Ik heb een SQUID proxy server opgezet onder linux met kernel versie 2.4
Ik zou graag willen dat ik niet bij elke client moet instellen dat er een proxy is.

Ik heb een DHCP server en ik heb als gateway het IP gepakt van de proxy en via de volgende regel poort 80 laten doorverwijzen naar 3128 maar dat wou niet echt werken:

iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128

  • Jelmer
  • Registratie: Maart 2000
  • Laatst online: 22:18
Je moet squid nog even vertellen dat ie transparant moet zijn ([google=squid transparent])

Verwijderd

Topicstarter
Het lukt me nog steeds niet.

Ik kan nu wel in de proxy instellingen van de client poort 80 zetten en poort 3128 en dat werkt maar proxy server uitzetten werkt niet.

Ik heb dit in de config erbij gezet:

httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on

edit:

het gateway adres staat ook op het adres van de proxy server.

[ Voor 11% gewijzigd door Verwijderd op 09-04-2005 15:20 ]


  • Spider.007
  • Registratie: December 2000
  • Niet online

Spider.007

* Tetragrammaton

Volgens mij is httpd_accel_host wat anders; dat wordt namelijk gebruikt om webservers te versnellen :) Met je iptables regel verstuur je het verkeer van remote-host-80 naar remote-host-3128; dat gaat dus inderdaad niet werken :)

---
Prozium - The great nepenthe. Opiate of our masses. Glue of our great society. Salve and salvation, it has delivered us from pathos, from sorrow, the deepest chasms of melancholy and hate


  • elevator
  • Registratie: December 2001
  • Niet online

elevator

Officieel moto fan :)

Weet je zeker dat je met een transparante proxy wil werken? Je zou ook eens kunnen kijken naar wpad bv :)

Verwijderd

Topicstarter
Ik kan ook naar http://proxy of http://192.168.10.1 als ik bij de clients de proxy aan of uit zet. Dan krijg ik gewoon een melding dat de website niet gevonden is van de proxy.

Maar zo gauw als ik de proxy uitzet bij de clients en naar buiten ga is er geen verbinding.

Mijn gateway adres is ook 192.168.10.1
Ik weet niet wat er mis is.

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
2005/04/09 23:25:48| Squid Cache (Version 2.4.STABLE7): Exiting normally.
2005/04/09 23:28:56| Starting Squid Cache version 2.4.STABLE7 for i686-pc-linux-gnu...
2005/04/09 23:28:56| Process ID 234
2005/04/09 23:28:56| With 1024 file descriptors available
2005/04/09 23:28:56| Performing DNS Tests...
2005/04/09 23:28:56| Successful DNS name lookup tests...
2005/04/09 23:28:56| DNS Socket created on FD 4
2005/04/09 23:28:56| Adding nameserver 192.168.0.1 from /etc/resolv.conf
2005/04/09 23:28:56| Unlinkd pipe opened on FD 9
2005/04/09 23:28:56| Swap maxSize 51200 KB, estimated 3938 objects
2005/04/09 23:28:56| Target number of buckets: 196
2005/04/09 23:28:56| Using 8192 Store buckets
2005/04/09 23:28:56| Max Mem  size: 8192 KB
2005/04/09 23:28:56| Max Swap size: 51200 KB
2005/04/09 23:28:56| Rebuilding storage in /usr/local/squid/cache (CLEAN)
2005/04/09 23:28:56| Using Least Load store dir selection
2005/04/09 23:28:56| Set Current Directory to /usr/local/squid/cache
2005/04/09 23:28:56| Loaded Icons.
2005/04/09 23:28:56| Accepting HTTP connections at 0.0.0.0, port 3128, FD 10.
2005/04/09 23:28:56| Accepting ICP messages at 0.0.0.0, port 3130, FD 11.
2005/04/09 23:28:56| WCCP Disabled.
2005/04/09 23:28:56| Ready to serve requests.
2005/04/09 23:29:07| Done scanning /usr/local/squid/cache swaplog (0 entries)
2005/04/09 23:29:07| Finished rebuilding storage from disk.
2005/04/09 23:29:07|         0 Entries scanned
2005/04/09 23:29:07|         0 Invalid entries.
2005/04/09 23:29:07|         0 With invalid flags.
2005/04/09 23:29:07|         0 Objects loaded.
2005/04/09 23:29:07|         0 Objects expired.
2005/04/09 23:29:07|         0 Objects cancelled.
2005/04/09 23:29:07|         0 Duplicate URLs purged.
2005/04/09 23:29:07|         0 Swapfile clashes avoided.
2005/04/09 23:29:07|   Took 10.7 seconds (   0.0 objects/sec).
2005/04/09 23:29:07| Beginning Validation Procedure
2005/04/09 23:29:07|   Completed Validation Procedure
2005/04/09 23:29:07|   Validated 0 Entries
2005/04/09 23:29:07|   store_swap_size = 0k
2005/04/09 23:29:07| storeLateRelease: released 0 objects
2005/04/09 23:34:55| Preparing for shutdown after 19 requests
2005/04/09 23:34:55| Waiting 30 seconds for active connections to finish
2005/04/09 23:34:55| FD 10 Closing HTTP connection
2005/04/09 23:38:53| Starting Squid Cache version 2.4.STABLE7 for i686-pc-linux-gnu...
2005/04/09 23:38:53| Process ID 225
2005/04/09 23:38:53| With 1024 file descriptors available
2005/04/09 23:38:53| Performing DNS Tests...
2005/04/09 23:38:53| Successful DNS name lookup tests...
2005/04/09 23:38:53| DNS Socket created on FD 4
2005/04/09 23:38:53| Adding nameserver 192.168.0.1 from /etc/resolv.conf
2005/04/09 23:38:53| Unlinkd pipe opened on FD 9
2005/04/09 23:38:53| Swap maxSize 51200 KB, estimated 3938 objects
2005/04/09 23:38:53| Target number of buckets: 196
2005/04/09 23:38:53| Using 8192 Store buckets
2005/04/09 23:38:53| Max Mem  size: 8192 KB
2005/04/09 23:38:53| Max Swap size: 51200 KB
2005/04/09 23:38:53| Rebuilding storage in /usr/local/squid/cache (DIRTY)
2005/04/09 23:38:53| Using Least Load store dir selection
2005/04/09 23:38:53| Set Current Directory to /usr/local/squid/cache
2005/04/09 23:38:53| Loaded Icons.
2005/04/09 23:38:53| Accepting HTTP connections at 0.0.0.0, port 3128, FD 10.
2005/04/09 23:38:53| Accepting ICP messages at 0.0.0.0, port 3130, FD 11.
2005/04/09 23:38:53| WCCP Disabled.
2005/04/09 23:38:53| Ready to serve requests.
2005/04/09 23:39:07| Done scanning /usr/local/squid/cache swaplog (0 entries)
2005/04/09 23:39:07| Finished rebuilding storage from disk.
2005/04/09 23:39:07|         0 Entries scanned
2005/04/09 23:39:07|         0 Invalid entries.
2005/04/09 23:39:07|         0 With invalid flags.
2005/04/09 23:39:07|         0 Objects loaded.
2005/04/09 23:39:07|         0 Objects expired.
2005/04/09 23:39:07|         0 Objects cancelled.
2005/04/09 23:39:07|         0 Duplicate URLs purged.
2005/04/09 23:39:07|         0 Swapfile clashes avoided.
2005/04/09 23:39:07|   Took 13.8 seconds (   0.0 objects/sec).
2005/04/09 23:39:07| Beginning Validation Procedure
2005/04/09 23:39:07|   Completed Validation Procedure
2005/04/09 23:39:07|   Validated 0 Entries
2005/04/09 23:39:07|   store_swap_size = 0k
2005/04/09 23:39:08| storeLateRelease: released 0 objects

[ Voor 91% gewijzigd door Verwijderd op 10-04-2005 11:49 ]


Verwijderd

Topicstarter
Ik ben eruit wat het probleem is. Ik moest zelf een DNS server installeren en dan werkt hij wel. Hiervoor heb ik gewoon bind geinstalleerd en voor de rest niks aan de config veranderd.

Maar als ik nu naar een adres wat niet bestaat ga. Krijg ik geen foutmelding meer van de proxy dat de pagina niet bestaat. Maar gaat hij gewoon naar MSN zoeken.

Maar hij gaat wel via de proxy het internet op want als ik squid kill dan werkt het internet ook niet meer. (en hoor ik de HDD niet rammelen)

  • Spider.007
  • Registratie: December 2000
  • Niet online

Spider.007

* Tetragrammaton

offtopic:
je kan ook de logfiles in /var/log/squid tailen om erachter te komen of squid wordt gebruikt; vooral access.log kan interessant zijn. Gebruik eventueel een applicatie als squidview :)

---
Prozium - The great nepenthe. Opiate of our masses. Glue of our great society. Salve and salvation, it has delivered us from pathos, from sorrow, the deepest chasms of melancholy and hate


Verwijderd

Topicstarter
Weet iemand hoe ik dit opgelost krijgt?

De squid foutmeldingen weergeven ipv. die van pagina niet gevonden in de browser?

Ik gebruik bind
squid
dhcpd

Verwijderd

Ik heb hetzelfde opgezet wat jij wilt maken, ik post hierbij mijn config zonder acl' s zodat je kan kijken of jij wat mist.

http_port 192.168.0.1:3128
icp_port 192.168.0.1:3130
cache_mem 12 MB
maximum_object_size 4096 KB
minimum_object_size 1000 KB
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
htcp_port 0
maximum_icp_query_timeout 2000
dead_peer_timeout 5 seconds
log_ip_on_direct on
mime_table /usr/lib/squid/mime.conf
log_mime_hdrs off
pid_filename /var/run/squid.pid
debug_options ALL,1
quick_abort_min 16 KB
quick_abort_max 16 KB
quick_abort_pct 95
client_netmask 255.255.255.0
icon_directory /usr/lib/squid/icons
error_directory /usr/lib/squid/errors/English
hierarchy_stoplist cgi-bin ?
cache_dir ufs /var/spool/squid 100 16 256
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on

Klopt het dat eth0 je netwerkkaart voor je netwerk is, of hangt hier de modem aan?
Pagina: 1