Skocz do zawartości

Igor

Użytkownicy
  • Postów

    16
  • Dołączył

  • Ostatnia wizyta

Odpowiedzi opublikowane przez Igor

  1. Witam

    Szukam bezpłatnego oprogramowania pod linuxa do generowania formularzy i ankiet. Zależy mi aby na podstawie udzielonych odpowiedzi były również generowane statystyki.

    Wie może ktoś czy takie oprogramowanie pod linuxa w ogóle istnieje ?

     

    Pozdrawiam

    Igor

  2. Witam

    Mam problem z konfiguracją drugiego switcha dla vlan. Układ jest taki, ze mam 2  switche TP-LINK TL-SL2452WEB.  O ile na pierwszym switchu wszystko działa to na drugim vlany kompletnie nie działają. Żaden z komputerów podpiętych do którejkolwiek grupy vlan nie otrzymuje adresu IP oraz nie ma nią komunikacji z poziomu serwera. Nie wiem co mam źle ustawione. Jak macie jakieś doświadczenia w tej kwestii to proszę zerknijcie na poniższe fotki.  Może ktoś ze świeżym umysłem zauważy błąd. Mój mózg już wysechł ... :D. Oba switche mam spięte przez port Giga2 na swich1 i Giga1 na switch2. Giga1 switch1 podpięty jest serwer z vlanami. 

     

    Bardzo zależy mi na szybkim rozwiązaniu problemu.

     

    Pozdrawiam

    Igor

     

     

    1.png

    2.png

    3.png

    4.png

    5.png

    8.png

    9.png

    11.png

    12.png

    1.png

    2.png

    3.png

    8.png

    9.png

  3. # curl -I  http://sub.domena.tld/.well-known/acme-challenge/plik.txt
    HTTP/1.1 302 Found
    Date: Tue, 26 Jun 2018 11:48:49 GMT
    Server: Apache/2.2.15 (CentOS)
    Location: https://www.sub.domena.tld/.well-known/acme-challenge/plik.txt
    Connection: close
    Content-Type: text/html; charset=iso-8859-1
    
    [root@ns1 acme-challenge]# curl http://sub.domena.tld/.well-known/acme-challenge/plik.txt
    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    <html><head>
    <title>302 Found</title>
    </head><body>
    <h1>Found</h1>
    <p>The document has moved <a href="https://www.sub.domena.tld/.well-known/acme-challenge/plik.txt">here</a>.</p>
    </body></html>
    # curl http://domena.tld/.well-known/acme-challenge/plik.txt
    domena.tld
    
    [root@ns1 acme-challenge]# curl -I http://domena.tld/.well-known/acme-challenge/plik.txt
    HTTP/1.1 200 OK
    Date: Tue, 26 Jun 2018 11:51:34 GMT
    Server: Apache/2.2.15 (CentOS)
    Last-Modified: Tue, 26 Jun 2018 11:17:52 GMT
    ETag: "a6040c-b-56f89a6256343"
    Accept-Ranges: bytes
    Content-Length: 11
    Connection: close
    Content-Type: text/plain; charset=UTF-8
    Content-Language: pl

     

  4. Trochę zaganiany jestem dzisiaj :( Jak możesz to zerknij...

    dla sub.domena.tld:

    # cat plik.txt
    sub.domena.tld
    
    
    # curl http://www.sub.domena.tld/.well-known/acme-challenge/plik.txt
    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    <html><head>
    <title>302 Found</title>
    </head><body>
    <h1>Found</h1>
    <p>The document has moved <a href="https://www.sub.domena.tld/.well-known/acme-challenge/plik.txt">here</a>.</p>
    </body></html>
    
    # curl -I  http://www.sub.domena.tld/.well-known/acme-challenge/plik.txt
    HTTP/1.1 302 Found
    Date: Tue, 26 Jun 2018 11:20:51 GMT
    Server: Apache/2.2.15 (CentOS)
    Location: https://www.sub.domena.tld/.well-known/acme-challenge/plik.txt
    Connection: close
    Content-Type: text/html; charset=iso-8859-1

    dla domena.tld:

    # cat plik.txt
    domena.tld
    
    # curl http://www.domena.tld/.well-known/acme-challenge/plik.txt
    domena.tld
    
    # curl -I http://www.domena.tld/.well-known/acme-challenge/plik.txt
    HTTP/1.1 200 OK
    Date: Tue, 26 Jun 2018 11:20:22 GMT
    Server: Apache/2.2.15 (CentOS)
    Last-Modified: Tue, 26 Jun 2018 11:17:52 GMT
    ETag: "a6040c-b-56f89a6256343"
    Accept-Ranges: bytes
    Content-Length: 11
    Connection: close
    Content-Type: text/plain; charset=UTF-8
    Content-Language: pl
  5.  

    Dzięki za podpowiedź. Trochę rzuciło to światło na problem. Prawa do katalogów z certyfikatami dla domena.tld i sub.domena.tld są identyczne:

    # ls -al /var/www/domena/
    drwxr-xr-x  3 root   root    4096 06-05 09:57 .well-known
    drwxr-xr-x  2 root   root   4096 06-21 13:07 acme-challenge
    -rw-r--r-- 1 apache apache   87 06-21 13:07 awoTDk92yuIdc0UCi61koQKRanwtxxxxx
    -rw-r--r-- 1 apache apache   87 06-21 13:07 P_QJwVKpxxxxxxrqMAkpFSWoI
    
    # ls -al /var/www/sub/
    drwxr-xr-x  3 root   root    4096 06-05 09:57 .well-known
    drwxr-xr-x  2 root   root   4096 06-21 13:07 acme-challenge
    -rw-r--r-- 1 apache apache   87 06-21 11:26 DmQTZfdlgPCBElyyyyyyyyTR6KV9Gq7K849owg
    -rw-r--r-- 1 apache apache   87 06-21 11:26 y0I0d_AndNR-xcu5A-ywAcUbbQyyyyyyyyiCSKI

    Dziwna sprawa bo po http dla domena.tld  modsec blokuje mi dostęp.

    # curl -I http://www.doemna.tld/.well-known/acme-challenge/
    HTTP/1.1 403 Forbidden
    Date: Tue, 26 Jun 2018 10:20:57 GMT
    Server: Apache/2.2.15 (CentOS)
    Vary: accept-language,accept-charset
    Accept-Ranges: bytes
    Connection: close
    Content-Type: text/html; charset=iso-8859-1
    Content-Language: en
    
    # curl -I https://www.domena.tld/.well-known/acme-challenge/
    curl: (60) Peer certificate cannot be authenticated with known CA certificates
    More details here: http://curl.haxx.se/docs/sslcerts.html
    
    curl performs SSL certificate verification by default, using a "bundle"
     of Certificate Authority (CA) public keys (CA certs). If the default
     bundle file isn't adequate, you can specify an alternate file
     using the --cacert option.
    If this HTTPS server uses a certificate signed by a CA represented in
     the bundle, the certificate verification probably failed due to a
     problem with the certificate (it might be expired, or the name might
     not match the domain name in the URL).
    If you'd like to turn off curl's verification of the certificate, use
     the -k (or --insecure) option.

    To samo dla sub.domena.tld zwraca prawidłowe dane:

    # curl -I http://www.sub.domena.tld/.well-known/acme-challenge/
    HTTP/1.1 302 Found
    Date: Tue, 26 Jun 2018 10:41:13 GMT
    Server: Apache/2.2.15 (CentOS)
    Location: https://www.sub.domena.tld/.well-known/acme-challenge/
    Connection: close
    Content-Type: text/html; charset=iso-8859-1
    
    # curl -I https://www.sub.domena.tld/.well-known/acme-challenge/
    curl: (60) Peer certificate cannot be authenticated with known CA certificates
    More details here: http://curl.haxx.se/docs/sslcerts.html
    
    curl performs SSL certificate verification by default, using a "bundle"
     of Certificate Authority (CA) public keys (CA certs). If the default
     bundle file isn't adequate, you can specify an alternate file
     using the --cacert option.
    If this HTTPS server uses a certificate signed by a CA represented in
     the bundle, the certificate verification probably failed due to a
     problem with the certificate (it might be expired, or the name might
     not match the domain name in the URL).
    If you'd like to turn off curl's verification of the certificate, use
     the -k (or --insecure) option.

     # tail -f /var/log/httpd/modsec_audit.log

    --303c6e32-A--
    [26/Jun/2018:12:20:57 +0200] WzITiVm83vIAAAZRjDsAAAAT 89.111.222.333 41858 89.111.222.333 80
    --303c6e32-B--
    HEAD /.well-known/acme-challenge/ HTTP/1.1
    User-Agent: curl/7.19.7 (i386-redhat-linux-gnu) libcurl/7.19.7 NSS/3.27.1 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
    Host: www.domena.tld
    Accept: */*
    
    --303c6e32-F--
    HTTP/1.1 403 Forbidden
    Vary: accept-language,accept-charset
    Accept-Ranges: bytes
    Connection: close
    Content-Type: text/html; charset=iso-8859-1
    Content-Language: en
    
    --303c6e32-H--
    Apache-Error: [file "/builddir/build/BUILD/httpd-2.2.15/modules/generators/mod_autoindex.c"] [line 2292] [level 3] Directory index forbidden by Options directive: /var/www/domena/.well-known/acme-challenge/
    Apache-Handler: type-map
    Stopwatch: 1530008457574754 4797 (- - -)
    Stopwatch2: 1530008457574754 4797; combined=439, p1=151, p2=258, p3=0, p4=0, p5=29, sr=40, sw=1, l=0, gc=0
    Producer: ModSecurity for Apache/2.7.3 (http://www.modsecurity.org/); OWASP_CRS/2.2.6.
    Server: Apache/2.2.15 (CentOS)
    Engine-Mode: "ENABLED"

    Przyczyna ?

  6. NameVirtualHost *:80
    
    <VirtualHost *:80>
        Alias /images /var/www/domena/images
        DocumentRoot /var/www/domena
        ServerName www.domena.tld
        ServerAlias domena.tld
        Redirect / https://www.domena.tld/
        ErrorLog logs/domena-error.log
        CustomLog logs/domena-access.log combined
     </VirtualHost>
    
    <VirtualHost *:80>
        Alias /images /var/www/sub/images
        DocumentRoot /var/www/sub
        ServerName www.sub.domena.tld
        ServerAlias sub.domena.tld
        Redirect / https://www.sub.domena.tld/
        ErrorLog logs/sub-error.log
        CustomLog logs/sub-access.log combined
     </VirtualHost>

     

  7. Nie upieram się , że nie jest tak jak mówisz. Ja swoje vhosts ładuję z jednego pliku:

     

    # --------------------------------------------------------- www.domena.tld
    
    NameVirtualHost *:443
    
    <VirtualHost *:443>
        Alias /images /var/www/domena/images
        DocumentRoot /var/www/domena
        ServerName www.domena.tld
        ServerAlias domena.tld
        ErrorLog logs/domena-error.log
        CustomLog logs/domena-access.log combined
    
        SSLEngine on
            SSLCertificateFile /etc/pki/tls/certs/domena/certificate.crt
            SSLCertificateKeyFile /etc/pki/tls/private/domena/private.key
    
    </VirtualHost>
    
    # --------------------------------------------------------- www.sub.domena.tld
    <VirtualHost *:443>
        Alias /images /var/www/sub/images
        DocumentRoot /var/www/sub/
        ServerName www.sub.domena.tld
        ServerAlias sub.domena.tld
        ErrorLog logs/sub-error.log
        CustomLog logs/sub-access.log combined
    
        SSLEngine on
            SSLCertificateFile /etc/pki/tls/certs/sub/certificate.crt
            SSLCertificateKeyFile /etc/pki/tls/private/sub/private.key
    
    </VirtualHost>

    Walnąłem się gdzieś w konfiguracji ?

     

    Pozdrawiam

    Igor

  8. Witam

     

    Mój problem wyszedł podczas generowania certyfikatów na stronce ssfforfree.com. Otórz mam domenę (domena.tld)  w której założyłem poddomenę (sub.domena.tld) O ile dla subdomeny poszło wysztko ok to dla tld mam problem ponieważ przy kroku piątym ...

     

    Verify successful upload by visiting the following links in your browser 
    http://www.domena.tld/.well-known/acme-challenge/awoTDk92yuIdc0UCi61koQKRanwt6Gsofl7GP2EXN5s
    http://domena.tld/.well-known/acme-challenge/P_QJwVKpJ0LNgckOXxpCdM3NSjgjNSxirqMAkpFSWoI

    pierwszy link otwiera się  prawidłowo  a drugi z błędęm:

     

    Nie znaleziono obiektu!
    Nie znaleziono żądanego URLa na tym serwerze. Jeśli wpisałeś URLa ręcznie, sprawdź, czy nie się nie pomyliłeś.
    
    Jeśli myślisz, że jest to błąd tego serwera, skontaktuj się z administratorem.
    
    Error 404
    www.sub.domena.tld
    Thu Jun 21 13:53:26 2018
    Apache/2.2.15 (CentOS)

    Chodzi o serwer do jakiego odwołuje się link a mianowicie do poddomeny zamiast do domena.tld.

    Zależy mi żeby mieć zarówno adres http:// jak i również www.

     

    Moja konfiguracja DNS wygląda tak:

    $TTL 86400
    @       IN      SOA     ns1.domena.tld.    root.domena.tld. (
                                    20181706        ;; serial
                                    3H              ;; refresh
                                    15M             ;; retry
                                    1W              ;; expiry
                                    1D)             ;; minimum
    ;;
            IN      NS      ns1.doemna.tld.
            IN      NS      ns1.innadomena.pl
    ;;
            IN      MX      5       poczta
            IN      A               89.111.222.333
    ;;
    ns1             IN      A       89.111.222.333
    poczta          IN      A       89.111.222.333
    www             IN      A       89.111.222.333
    ;;
    sub           	IN      CNAME   domena.tld.
    www.sub       	IN      A       89.111.222.333

    Wygląda tak jakby nie było adresu http:// dla domena.tld a jedynie www

    Może ktoś mi podpowiedzieć jak to ustawić ?

     

     

    Pozdrawiam

    Igor

  9. Witajcie

    Mam problem z kompilacja sarg-2.3.11 na Centos 7.xx.  Według tego co moje oczy widzą brakuje  polecenia "mkdir_p" . Rzecz w tym, że nigdzie go nie znalazłem w żadnej paczce.  Może ktoś miał podobny problem i go rozwiązał? Za wszelkie rady dziękuję z góry ...

     

    Pozdrawiam

    Mariusz

    # make install
    cd po ; make install
    make[1]: Wejście do katalogu `/del/sarg-2.3.11/po'
    /bin/sh: line 5: @mkdir_p@: nie znaleziono polecenia
    installing bg.gmo as /usr/share/locale/bg/LC_MESSAGES/sarg.mo
    /bin/sh: line 5: @mkdir_p@: nie znaleziono polecenia
    installing ca.gmo as /usr/share/locale/ca/LC_MESSAGES/sarg.mo
    /bin/sh: line 5: @mkdir_p@: nie znaleziono polecenia
    installing cs.gmo as /usr/share/locale/cs/LC_MESSAGES/sarg.mo
    /bin/sh: line 5: @mkdir_p@: nie znaleziono polecenia
    ...
    
    if test "sarg" = "gettext-tools"; then \
      @mkdir_p@ /usr/share/gettext/po; \
      for file in Makefile.in.in remove-potcdate.sin quot.sed boldquot.sed [email protected] [email protected] insert-header.sin Rules-quot   Makevars.template; do \
        /usr/bin/install -c -m 644 ./$file \
                        /usr/share/gettext/po/$file; \
      done; \
      for file in Makevars; do \
        rm -f /usr/share/gettext/po/$file; \
      done; \
    else \
      : ; \
    fi
    make[1]: Opuszczenie katalogu `/del/sarg-2.3.11/po'
    cp sarg /usr/bin/sarg
    chmod 755 /usr/bin/sarg
    cp sarg.1 /usr/share/man/man1/sarg.1
    chmod 755 /usr/share/man/man1/sarg.1
    cp ./exclude_codes /etc/sarg;
    cp ./user_limit_block /etc/sarg;
    cp -r ./images/* /usr/share/sarg/images;
    cp -r ./css.tpl /etc/sarg;

     

  10. Ok. Poradziłem sobie.  W sumie konfiguracja poniższa działa z małym wyjątkiem. W takim ustawieniu użytkownik nie autoryzuje się przy próbie dostępu do internetu, natomiast blokada GoodSites1 oraz TimeWorkUser1 działa.

    ...
    acl User1 src 192.168.1.101
    acl TimeWorkUser1 time M T W H F A 11:00-15:00
    acl GoodSites1 dstdomain "/etc/squid/users/user1/GoodSites.cfg"
    http_access allow User1 TimeWorkUser1 GoodSites1
    http_access deny User1
    
    
    auth_param basic program /usr/lib64/squid/basic_ncsa_auth /etc/squid/passwd
    auth_param basic children 5
    auth_param basic credentialsttl 8 hours
    auth_param basic realm Proxy: Wymagana autoryzacja
    acl ncsa_users proxy_auth REQUIRED
    http_access allow ncsa_users
    
    request_header_access Referer deny all
    request_header_access X-Forwarded-For deny all
    request_header_access Via deny all
    request_header_access Cache-Control deny all
    forwarded_for off
    ...

     

    Natomiast w takim jest autoryzacja ale nie ma blokady określonej w GoodSites1 ani w TimeWorkUser1.

    ...
    auth_param basic program /usr/lib64/squid/basic_ncsa_auth /etc/squid/passwd
    auth_param basic children 5
    auth_param basic credentialsttl 8 hours
    auth_param basic realm Proxy: Wymagana autoryzacja
    acl ncsa_users proxy_auth REQUIRED
    http_access allow ncsa_users
    
    acl User1 src 192.168.1.101
    acl TimeWorkUser1 time M T W H F A 11:00-15:00
    acl GoodSites1 dstdomain "/etc/squid/users/user1/GoodSites.cfg"
    http_access allow User1 TimeWorkUser1 GoodSites1
    http_access deny User1
    
    request_header_access Referer deny all
    request_header_access X-Forwarded-For deny all
    request_header_access Via deny all
    request_header_access Cache-Control deny all
    forwarded_for off
    ...

    Możecie mi wytłumaczyć jak to zorganizować aby obydwie rzeczy działały jednocześnie ? Rozumiem że kolejność reguł ma znaczenie.  Szukałem rozwiązania w necie ale nie natrafiłem na nic co by naprowadziło mnie na rozwiązanie tego problemu.

  11. A to rozwiązanie daje możliwości określenie blokowanych wybranych  domen dla pojedynczych użytkowników. Mi zależy na określeniu listy dostępnych domen i zablokowania wszystkich pozostałych. Myślałem o !lista_domen. Pytam się o tą możliwość bo nie orientuje się w dansguardian ale jeżeli daje taka możliwość to zgłębię temat

  12. Iptables:

    -A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
    -A POSTROUTING -o enp4s0 -j SNAT --to-source 192.168.0.215

    Logi :

    1519904778.243    246 192.168.1.100 TCP_TUNNEL/200 3661 CONNECT dmp.dtxngr.com:443 user1 HIER_DIRECT/93.179.237.142 -
    1519904778.384    389 192.168.1.100 TCP_TUNNEL/200 3661 CONNECT dmp.dtxngr.com:443 user1 HIER_DIRECT/93.179.237.142 -
    1519904778.385   3205 192.168.1.100 TCP_TUNNEL/200 3548 CONNECT pixel.rubiconproject.com:443 user1 HIER_DIRECT/62.67.193.75 -
    1519904778.407    155 192.168.1.100 TCP_TUNNEL/200 877 CONNECT pl-gmtdmp.mookie1.com:443 user1 HIER_DIRECT/52.28.4.97 -

    Squid działa ...

    Jakieś pomysły ?

  13. Hejka

    Postawiłem squida i chciałbym ograniczyć za jego pomocą użytkownikom dostęp do www w godzinach pracy.  Ale coś robię źle bo blokada nie działa. Moglibyście zerknąć i podpowiedzieć mi jak to poprawnie ustawić ?

     

    acl lan src 192.168.1.0/24
    
    ##########
    acl TimeWorkUser1 time M T W H F A 10:00-15:00
    acl User1 src 192.168.1.100
    acl GoodSitesUser1 dstdomain "/etc/squid/users/GoodSites.cfg"
    #########
    
    acl SSL_ports port 443
    acl Safe_ports port 80          # http
    acl Safe_ports port 443         # https
    
    acl CONNECT method CONNECT
    
    auth_param basic program /usr/lib64/squid/basic_ncsa_auth /etc/squid/passwd
    auth_param basic children 5
    auth_param basic credentialsttl 8 hours
    auth_param basic realm Proxy: Wymagana autoryzacja
    acl ncsa_users proxy_auth REQUIRED
    http_access allow ncsa_users
    
    http_access deny !Safe_ports
    http_access deny CONNECT !SSL_ports
    http_access allow localhost manager
    http_access deny manager
    
    http_access allow localhost
    
    #########
    http_access deny User1 !GoodSitesUser1
    http_access allow lan TimeWorkUser1
    #########
    
    http_access deny all
    
    http_port 3128
    
    coredump_dir /var/spool/squid
    
    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
    
    cache_access_log /var/log/squid/access.log
    cache_log /var/log/squid/cache.log
    cache_store_log /var/log/squid/store.log
    
    request_header_access Referer deny all
    request_header_access X-Forwarded-For deny all
    request_header_access Via deny all
    request_header_access Cache-Control deny all
    forwarded_for off

     #cat GoodSitesUser1.cfg

    www.domena1.pl
    domena2.pl

    Za wszelkie porady będę niezmiernie wdzięczny

     

    Pozdrawiam 

    Igor

×
×
  • Dodaj nową pozycję...

Powiadomienie o plikach cookie

Korzystając z forum, wyrażasz zgodę na: Warunki użytkowania, Regulamin, Polityka prywatności.