One can use OpenSSL’s c_client to validate that OCSP Stapling is working.
openssl s_client -connect 127.0.0.1:443 -tls1 -tlsextdebug -status| #!/usr/bin/perl | |
| use strict; | |
| chomp(my $filename=$ARGV[0]); | |
| chomp(my $username=$ARGV[1]); | |
| chomp(my $password=$ARGV[2]); | |
| if (!$filename || !$username || !$password) { | |
| print "USAGE: ./crypt.pl filename username password\n\n"; | |
| } else { |
| enableIPv6: no | |
| WorkDir: /var/www/tracker/ | |
| Options[_]: | |
| YSize[_]: 150 | |
| pagetop[tracker-conn]: <h1>tracker - Connections/min</h1><hr> | |
| target[tracker-conn]: `curl http://localhost:6969/stats?mode=conn` | |
| maxbytes[tracker-conn]: 100000000 | |
| title[tracker-conn]: Connections/min | |
| options[tracker-conn]: growright, nopercent, perminute |
One can use OpenSSL’s c_client to validate that OCSP Stapling is working.
openssl s_client -connect 127.0.0.1:443 -tls1 -tlsextdebug -status| #!/bin/sh | |
| find /var/log -regextype posix-extended -regex '.*\.([0-9]|gz)$' -type f -exec rm -f {} \; |
| #!/bin/sh | |
| # Install ufw and its dependencies. | |
| export DEBIAN_FRONTEND=noninteractive | |
| aptitude install -q -y ufw | |
| # SEE: https://serverfault.com/questions/416727 | |
| iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT | |
| # Configure ufw to allow SSH, HTTP and HTTPS and enable it. |
The sendmail package, which comes preinstalled with many distros, is often simply too much for a simple server that should not receive emails but rather deliver them. The sSMTP package is a lightweight replacement that does not set up regular cronjobs and only reacts if a subsystem actually wants to send a mail.
apt-get purge --yes sendmail*| public class Main { | |
| public static void main(String[] args) { | |
| f(null); | |
| } | |
| private static int f(Integer x) { | |
| return x + 42; | |
| } | |
| } |
| <?php | |
| final class Main { | |
| public static function f(int $x): int { | |
| return $x + 42; | |
| } | |
| } | |
| Main::f(null); |
| <?php | |
| class NaturalNumber { | |
| private $n; | |
| public function __construct(int &$n) { | |
| if ($n < 1) { | |
| throw new InvalidArgumentException('n must be greater than zero, got ' . $n); | |
| } | |
| function f(Integer? x) { | |
| return x?.plus(42); | |
| } | |
| print(f(null)); |