Changeset 9e573a2


Ignore:
Timestamp:
01/19/22 12:56:25 (3 years ago)
Author:
Edwin Eefting <edwin@datux.nl>
Branches:
master
Children:
ffaaf60
Parents:
892871d
Message:

fix network checks and log issue when hostname has -

Location:
npl
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • npl/overig/mozilla_nss/mozilla-nss.SlackBuild.orig

    r892871d r9e573a2  
    2727PKGNAM=mozilla-nss
    2828SRCNAM=nss
    29 VERSION=${VERSION:-3.60}
    30 NSPR=${NSPR:-4.29}
     29VERSION=${VERSION:-3.50}
     30NSPR=${NSPR:-4.25}
    3131BUILD=${BUILD:-1}
    3232
  • npl/syn3/webint/src/log/syslog.php

    r892871d r9e573a2  
    4747                        {
    4848                                //if it doens't match its probably a 'repeat message'
    49                                 if (!preg_match("/(\w*) *(\w*) (..:..:..) (\w*) ([^ ]*): (\w*) (.*)/",$line,$matches))
    50                                         preg_match("/(\w*) *(\w*) (..:..:..) (\w*) (\w*) (.*)/",$line,$matches);
     49                                if (!preg_match("/(\w*) *(\w*) (..:..:..) ([-\w]*) ([^ ]*): (\w*) (.*)/",$line,$matches))
     50                                        preg_match("/(\w*) *(\w*) (..:..:..) ([-\w]*) (\w*) (.*)/",$line,$matches);
    5151
    5252                                list($bagger,$month,$day,$time,$host, $user,$prio, $message)=$matches;
  • npl/syn3/webint/src/network/check.php

    r892871d r9e573a2  
    6969
    7070//check gateway ping routing
    71 $testip="77.74.48.182"; //datux webserver
     71$testip="8.8.8.8"; //google dns
    7272PrintCheckStart(_CheckingGatewayPing($testip));
    73 if (!Cmd("ping -c 3 -n -w 3 $testip"))
     73if (!Cmd("fping $testip"))
    7474        PrintCheckResult("ping","OK");
    7575else
    7676        PrintCheckResult("ping","ERROR");
    7777
     78//check gateway ping routing
     79$testip="1.1.1.1"; //cloudflare
     80PrintCheckStart(_CheckingGatewayPing($testip));
     81if (!Cmd("fping $testip"))
     82        PrintCheckResult("ping","OK");
     83else
     84        PrintCheckResult("ping","ERROR");
    7885
    79 //check gateway http update server routing
    80 PrintCheckStart(_CheckingGatewayHttpUpdateserver($testip));
    81 if (!Cmd("lynx -dump -connect_timeout 10 $testip | grep DatuX"))
    82         PrintCheckResult("http","OK");
    83 else
    84         PrintCheckResult("http","ERROR");
    85 
    86 
     86       
    8787//check dns servers
    8888$dnss=getDNS();
     
    9696}
    9797
     98//check http via google
     99PrintCheckStart(_CheckingGatewayHttpUpdateserver("www.google.com"));
     100if (!Cmd("lynx -dump -connect_timeout 10 www.google.com"))
     101        PrintCheckResult("http","OK");
     102else
     103        PrintCheckResult("http","ERROR");
     104
    98105
    99106//check uitgaande mail connectie naar 25
    100107//veel providers zetten dit dicht.
    101108
    102 $testmail="77.74.48.185";
     109$testmail="smtp.google.com";
    103110PrintCheckStart(_CheckingGatewayMail($testmail));
    104111if (!Cmd("nc $testmail 25 -w 1 -q 1 -z"))
     
    112119        PrintCheckStart(_CheckingIpsecPort("500"));
    113120       
    114         $port500=SafeExec("grep '77.74.48.182:.*not enough room' /var/log/secure |tail -1");
    115         $port4500=SafeExec("grep '77.74.48.182:.*too small packet' /var/log/secure |tail -1");
     121        $port500=SafeExec("grep ':.*not enough room' /var/log/secure |tail -1");
     122        $port4500=SafeExec("grep ':.*too small packet' /var/log/secure |tail -1");
    116123       
    117124        rpc("TestIpsec");
    118125       
    119         $port500tested=SafeExec("grep '77.74.48.182:.*not enough room' /var/log/secure |tail -1");
    120         $port4500tested=SafeExec("grep '77.74.48.182:.*too small packet' /var/log/secure |tail -1");
     126        $port500tested=SafeExec("grep ':.*not enough room' /var/log/secure |tail -1");
     127        $port4500tested=SafeExec("grep ':.*too small packet' /var/log/secure |tail -1");
    121128       
    122129        if ($port500[0]!=$port500tested[0])
Note: See TracChangeset for help on using the changeset viewer.