Server/watchbert: Unterschied zwischen den Versionen

Aus C3D2
Zur Navigation springen Zur Suche springen
Keine Bearbeitungszusammenfassung
KKeine Bearbeitungszusammenfassung
 
(2 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
[[Kategorie:Infrastruktur]]
{{beinhaltet Abweichungen von der Realität}}
 
[[Server/freebert]] is gone!
 
== Hardware ==
 
Virtualisiert durch [[Server/freebert/FreeBSD]]


== Hardware Info ==
== Software ==
Virtualisiert durch [[intern:Freebert]]


== Software Info ==
* FreeBSD Jail
FreeBSD Jail Container
* apache 2.4
* apache 2.4
* collectd 5
* collectd 5


== Verwendungszweck ==
== Verwendungszweck ==
* proxy.pac für Squid Jail
* proxy.pac für Squid Jail / tor Jail
* SNMP Auswertung
* SNMP Auswertung
* ReverseProxy für /How_to_fix_your_hq_network/
* ReverseProxy für /How_to_fix_your_hq_network/
Zeile 62: Zeile 66:
           allow from all
           allow from all
         </Proxy>
         </Proxy>
</source>
== proxy.pac ==
<source lang=bash>
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;
}
</source>
</source>


== Log ==
== Log ==
* 05.06.2014 - Tor.onion per proxy.pac
* 17.05.2014 - Wiki ReverseProxy für kaputtes .1er Gateway
* 17.05.2014 - Wiki ReverseProxy für kaputtes .1er Gateway
* 16.04.2014 - einfaches Basis Setup
* 16.04.2014 - einfaches Basis Setup
[[Kategorie:Infrastruktur]]

Aktuelle Version vom 4. November 2014, 04:05 Uhr

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