Server/watchbert

Aus C3D2
(Weitergeleitet von Watchbert.hq.c3d2.de)
Zur Navigation springen Zur Suche springen

Vorlage:Beinhaltet Abweichungen von der Realität

Server/freebert is gone!

Hardware

Virtualisiert durch Server/freebert/FreeBSD

Software

  • FreeBSD Jail
  • apache 2.4
  • collectd 5

Verwendungszweck

  • proxy.pac für Squid Jail / tor Jail
  • SNMP Auswertung
  • ReverseProxy für /How_to_fix_your_hq_network/

JAIL: Collectd Anpassung

vi /usr/local/etc/collectd.conf

LoadPlugin snmp
<Plugin snmp>

  <Data "std_traffic">
    Type "if_octets"
    Table true
    Instance "IF-MIB::ifDescr"
    Values "IF-MIB::ifInOctets" "IF-MIB::ifOutOctets"
  </Data>

  <Host "etherkiller">
    Address "172.22.99.6"
    Version 2
    Community "public"
    Collect "std_traffic"
    Interval 120  
  </Host>

</Plugin>

Collectd Auswertung

http://watchbert.hq.c3d2.de/cgi-bin/collection.cgi

ReverseProxy für How_to_fix_your_hq_network

vi /usr/local/etc/apache24/httpd.conf

ProxyRequests off
ProxyPass /wiki/ https://wiki.c3d2.de/
ProxyPassReverse /wiki/ https://wiki.c3d2.de/ 
ProxyPass /How_to_fix_your_hq_network/ https://wiki.c3d2.de/How_to_fix_your_hq_network/
ProxyPassReverse /How_to_fix_your_hq_network/ https://wiki.c3d2.de/How_to_fix_your_hq_network/
SSLProxyEngine On
# ProxyPreserveHost on
# ProxyVia On

        <Proxy *>
          Order deny,allow
          allow from all
        </Proxy>

proxy.pac

function FindProxyForURL(url, host) {

    squid = "PROXY 172.22.99.53:3128; DIRECT";
    tor = "SOCKS 172.22.99.75:9050";

    if (shExpMatch(host,"*.onion")) {
        return tor;
    }

    if ((host == "172.22.99.54") ||
        (host == "watchbert.hq.c3d2.de")) {
       return "DIRECT";
    }

    // no proxy for local hosts without domain:
    if(isPlainHostName(host)) return direct;

    //    //We only cache http
    //     if (
    //         url.substring(0, 4) == "ftp:"   ||
    //         url.substring(0, 6) == "rsync:"
    //        )
    //    return direct;

    // proxy everything else:
    return proxy;
}

Log

  • 05.06.2014 - Tor.onion per proxy.pac
  • 17.05.2014 - Wiki ReverseProxy für kaputtes .1er Gateway
  • 16.04.2014 - einfaches Basis Setup