Vyatta – webproxy

Проксито заработва още с първия ред в който ще определим адрес на сървъра. Порт 80 сам се пренасочва към 3128 където слуша проксито по подразбиране.

                                                                                      ________
                                                                                    /
                                                                                    |
                                                                                    /
        __                                                                         /
    ___/  \_                              +-----------------+                      |
  _/        \__                           |  Vyatta router  |                     /
 /             \       192.168.100.1 eth0 |                 | eth1 93.155.130.11  |
| Local network --------------------------+    Webproxy     +---------------------+     Internet
 \           __/                          |                 |                     |
   \__     __/                            |                 |                     \
      \___/                               +-----------------+                      |
                                                                                   \
                                                                                    \
                                                                                     |
                                                                                      \________

vyatta@core2# set service webproxy listen-address 192.168.100.1
[edit]
vyatta@core2# commit
Restarting Squid HTTP Proxy 3.0: squid3.
[edit]
vyatta@core2# set service webproxy cache-size 1024
[edit]
 
vyatta@core2# set service webproxy url-filtering squidguard local-block microsoft.com
[edit]
vyatta@core2# commit
Warning: no blacklists installed
Restarting Squid HTTP Proxy 3.0: squid3 Waiting.....................done.
vyatta@core2# run show webproxy log
1266618980.688      0 192.168.100.2 TCP_MISS/302 292 GET http://www.microsoft.com/ - NONE/- -
1266618980.876    124 192.168.100.2 TCP_MISS/302 583 GET http://www.google.com/ - DIRECT/209.85.135.103 text/html
1266618981.020    133 192.168.100.2 TCP_MISS/200 5287 GET http://www.google.bg/ - DIRECT/209.85.135.106 text/html
1266619119.706      1 192.168.100.2 TCP_MISS/302 292 GET http://facebook.com/ - NONE/- -
1266619119.857    115 192.168.100.2 TCP_MISS/302 583 GET http://www.google.com/ - DIRECT/209.85.135.103 text/html
1266619120.140    261 192.168.100.2 TCP_MISS/200 5286 GET http://www.google.bg/ - DIRECT/209.85.135.99 text/html
[edit]
 
vyatta@core2# set service webproxy url-filtering squidguard local-block-keyword porn
[edit]
vyatta@core2# commit
Warning: no blacklists installed
Restarting Squid HTTP Proxy 3.0: squid3 Waiting.....................done.
[edit]
1266619736.898      0 192.168.100.2 TCP_MISS/302 292 GET http://www.google.bg/search? - NONE/- -
1266619736.978     68 192.168.100.2 TCP_MISS/302 583 GET http://www.google.com/ - DIRECT/209.85.135.99 text/html
1266619737.115    112 192.168.100.2 TCP_MISS/200 5286 GET http://www.google.bg/ - DIRECT/209.85.135.147 text/html
1266619737.231     77 192.168.100.2 TCP_MISS/200 5307 GET http://www.google.bg/ - DIRECT/209.85.135.147 text/html
 
vyatta@core2# set service webproxy disable-access-log
[edit]
vyatta@core2# commit
Warning: no blacklists installed
Restarting Squid HTTP Proxy 3.0: squid3 Waiting.....................done.
[edit]
 
vyatta@core2# show service webproxy
 cache-size 1024
 disable-access-log
 listen-address 192.168.100.1 {
 }
 url-filtering {
     squidguard {
         local-block microsoft.com
         local-block facebook.com
         local-block-keyword porn
     }
 }
[edit]

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.