a good fuckin update

This commit is contained in:
nihilist 2024-08-12 23:22:38 +02:00
parent 7b3f8ea7ed
commit 1f6ed2fa82
80 changed files with 534 additions and 534 deletions

View file

@ -46,7 +46,7 @@
<li><a href="/about.html">About</a></li>
<li><a href="/blog.html">Categories</a></li>
<li><a href="https://blog.nihilism.network/donate.html">Donate</a></li>
<li><a href="https://blog.nowhere.moe/donate.html">Donate</a></li>
<li><a href="/contact.html">Contact</a></li>
</ul>
</div><!--/.nav-collapse -->
@ -450,9 +450,9 @@ net.ipv4.ip_forward = 1
<img src="3.png" class="imgRz">
<p>example of the record on a <a href="../dns/index.html">bind9</a> server:</p>
<pre><code class="nim">
root@mail-gw:~# cat /var/cache/bind/db.nihilism.network
root@mail-gw:~# cat /var/cache/bind/db.nowhere.moe
mail.nihilism.network. IN A 23.137.250.140
mail.nowhere.moe. IN A 23.137.250.140
</pre></code>
@ -462,15 +462,15 @@ root@mail-nihilism:~# curl ifconfig.me
23.137.250.140root@mail-nihilism:~#
root@mail-nihilism:~# curl ifconfig.me ; echo
23.137.250.140
root@mail-nihilism:~# ping mail.nihilism.network
PING mail.nihilism.network (23.137.250.140) 56(84) bytes of data.
root@mail-nihilism:~# ping mail.nowhere.moe
PING mail.nowhere.moe (23.137.250.140) 56(84) bytes of data.
64 bytes from 23.137.250.140 (23.137.250.140): icmp_seq=1 ttl=64 time=160 ms
--- mail.nihilism.network ping statistics ---
--- mail.nowhere.moe ping statistics ---
2 packets transmitted, 1 received, 50% packet loss, time 1001ms
rtt min/avg/max/mdev = 160.031/160.031/160.031/0.000 ms
root@mail-nihilism:~# ping nihilism.network
PING nihilism.network (23.137.250.141) 56(84) bytes of data.
root@mail-nihilism:~# ping nowhere.moe
PING nowhere.moe (23.137.250.141) 56(84) bytes of data.
64 bytes from 23.137.250.141 (23.137.250.141): icmp_seq=1 ttl=63 time=204 ms
</code></pre>
@ -479,7 +479,7 @@ PING nihilism.network (23.137.250.141) 56(84) bytes of data.
<pre><code class="nim">
root@mail-nihilism:~# rm /etc/nginx/sites-*/default
root@mail-nihilism:~# cat /etc/nginx/sites-available/mail.nihilism.network.conf
root@mail-nihilism:~# cat /etc/nginx/sites-available/mail.nowhere.moe.conf
server {
listen 80;
listen [::]:80;
@ -487,14 +487,14 @@ server {
index index.html;
server_name mail.nihilism.network;
server_name mail.nowhere.moe;
location / {
try_files $uri $uri/ =404;
}
}
root@mail-nihilism:~# ln -s /etc/nginx/sites-available/mail.nihilism.network.conf /etc/nginx/sites-enabled/
root@mail-nihilism:~# ln -s /etc/nginx/sites-available/mail.nowhere.moe.conf /etc/nginx/sites-enabled/
root@mail-nihilism:~# systemctl restart nginx
root@mail-nihilism:~# systemctl status nginx
@ -517,9 +517,9 @@ Dec 08 13:18:14 mail-nihilism systemd[1]: Starting A high performance web server
Dec 08 13:18:14 mail-nihilism systemd[1]: Started A high performance web server and a reverse proxy server.
root@mail-nihilism:~# mkdir -p /var/www/mail/
root@mail-nihilism:~# echo 'Nihilism Network' > /var/www/mail/index.html
root@mail-nihilism:~# echo 'nowhere.moe' > /var/www/mail/index.html
root@mail-nihilism:~# curl 127.0.0.1
Nihilism Network
nowhere.moe
root@mail-nihilism:~# ip a | grep inet
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
@ -530,7 +530,7 @@ root@mail-nihilism:~# ip a | grep inet
#from the vpn server:
root@mail-gw:~# curl 10.8.0.2
Nihilism Network
nowhere.moe
</code></pre>
<p>Now that's done we use certbot to get certificate from the local mail server:</p>
@ -540,7 +540,7 @@ root@mail-nihilism:~# certbot --nginx
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator nginx, Installer nginx
Enter email address (used for urgent renewal and security notices)
(Enter 'c' to cancel): nihilist@nihilism.network
(Enter 'c' to cancel): nihilist@nowhere.moe
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
@ -561,27 +561,27 @@ Account registered.
Which names would you like to activate HTTPS for?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: mail.nihilism.network
1: mail.nowhere.moe
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel):
Requesting a certificate for mail.nihilism.network
Requesting a certificate for mail.nowhere.moe
Performing the following challenges:
http-01 challenge for mail.nihilism.network
http-01 challenge for mail.nowhere.moe
Waiting for verification...
Cleaning up challenges
Deploying Certificate to VirtualHost /etc/nginx/sites-enabled/mail.nihilism.network.conf
Redirecting all traffic on port 80 to ssl in /etc/nginx/sites-enabled/mail.nihilism.network.conf
Deploying Certificate to VirtualHost /etc/nginx/sites-enabled/mail.nowhere.moe.conf
Redirecting all traffic on port 80 to ssl in /etc/nginx/sites-enabled/mail.nowhere.moe.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled https://mail.nihilism.network
Congratulations! You have successfully enabled https://mail.nowhere.moe
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/mail.nihilism.network/fullchain.pem
/etc/letsencrypt/live/mail.nowhere.moe/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/mail.nihilism.network/privkey.pem
/etc/letsencrypt/live/mail.nowhere.moe/privkey.pem
Your certificate will expire on 2023-03-08. To obtain a new or
tweaked version of this certificate in the future, simply run
certbot again with the "certonly" option. To non-interactively
@ -591,13 +591,13 @@ IMPORTANT NOTES:
Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
Donating to EFF: https://eff.org/donate-le
root@mail-nihilism:~# cat /etc/nginx/sites-available/mail.nihilism.network.conf
root@mail-nihilism:~# cat /etc/nginx/sites-available/mail.nowhere.moe.conf
server {
root /var/www/mail;
index index.html;
server_name mail.nihilism.network;
server_name mail.nowhere.moe;
location / {
try_files $uri $uri/ =404;
@ -605,15 +605,15 @@ server {
listen [::]:443 ssl ipv6only=on; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/mail.nihilism.network/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/mail.nihilism.network/privkey.pem; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/mail.nowhere.moe/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/mail.nowhere.moe/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = mail.nihilism.network) {
if ($host = mail.nowhere.moe) {
return 301 https://$host$request_uri;
} # managed by Certbot
@ -621,7 +621,7 @@ server {
listen 80;
listen [::]:80;
server_name mail.nihilism.network;
server_name mail.nowhere.moe;
return 404; # managed by Certbot
</code></pre>
@ -645,15 +645,15 @@ root@mail-nihilism:~# sh emailwiz.sh
</code></pre>
<img src="4.png" class="imgRz">
<p>(putting the TLD instead of mail.nihilism.network here is intentional)</p>
<p>(putting the TLD instead of mail.nowhere.moe here is intentional)</p>
<img src="5.png" class="imgRz">
<p>if it complains with the error "Please point your domain (nihilism.network) to your server's ipv4 address, do the following:</p>
<p>if it complains with the error "Please point your domain (nowhere.moe) to your server's ipv4 address, do the following:</p>
<pre><code class="nim">
#add it into your /etc/hosts
vim /etc/hosts
cat /etc/hosts | grep nihilism.network
23.137.250.140 nihilism.network
cat /etc/hosts | grep nowhere.moe
23.137.250.140 nowhere.moe
#add it into your DNS zone too (ex in bind9 below):
@ -667,7 +667,7 @@ cat /etc/hosts | grep nihilism.network
<p>Here's how you can set it up on a bind9 DNS server:</p>
<pre><code class="nim">
$TTL 604800
@ IN SOA ns1.nihilism.network. nihilist.nihilism.network. (
@ IN SOA ns1.nowhere.moe. nihilist.nowhere.moe. (
33 ; Serial
604800 ; Refresh
86400 ; Retry
@ -675,22 +675,22 @@ $TTL 604800
604800 ) ; Negative Cache TTL
;
; name servers - NS records
3600 IN NS ns1.nihilism.network.
3600 IN NS ns2.nihilism.network.
3600 IN NS ns1.nowhere.moe.
3600 IN NS ns2.nowhere.moe.
3600 IN A 23.137.250.141
3600 IN AAAA fe80::216:3eff:fe6c:c335
; mail-gw services
@ IN MX 0 mail.nihilism.network.
nihilism.network. IN TXT "v=spf1 mx a:mail.nihilism.network -all"
mail.nihilism.network. IN A 23.137.250.140
mail._domainkey.nihilism.network. IN TXT (
@ IN MX 0 mail.nowhere.moe.
nowhere.moe. IN TXT "v=spf1 mx a:mail.nowhere.moe -all"
mail.nowhere.moe. IN A 23.137.250.140
mail._domainkey.nowhere.moe. IN TXT (
"v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAu94n6zyhzWLZZrgvRq5HrSAh29TRi"
"jw6AXzFoJeahRPoAnJ3njOfOgbCzxUsVNO1L2+NX2P5iZMkdiVtB7rE71wUutegAb0wCDY5k5RNLUlAThxdlou0ro37H"
"SWK5GRAcEFKm1iab63uTtAXtIvZDPLYMxZMIUq4osxYEgAXY4BCzFBCyfohvr+eGd/kPbfOC9f7jrBnFiOVllnB+yPQKe"
"XwPeVlPrw68muFiVg4vWfMMzayINQgC12d73hKVZIwD8T6V9Kznv0dPi929CDWns2alU2dZypVSHxWm3BZyb4SCobdrFNW"
"xfzb1dz7n6/ms5u0EVAKU9ufGOgS4A70oQIDAQAB")
_dmarc.nihilism.network. IN TXT "v=DMARC1; p=reject; rua=mailto:dmarc@nihilism.network; fo=1"
_dmarc.nowhere.moe. IN TXT "v=DMARC1; p=reject; rua=mailto:dmarc@nowhere.moe; fo=1"
[...]
</pre></code>
@ -776,7 +776,7 @@ MAC Address: EE:B5:C9:3A:C3:FE (Unknown)
<p>If you don't have one, you can click create a new OpenPGP key, but i have one so i'll just import it:</p>
<pre><code class="nim">
[ 10.8.0.3/24 ] [ nowhere ] [~]
→ gpg --output ~/.nihilist.privkey --export-secret-keys nihilist@nihilism.network
→ gpg --output ~/.nihilist.privkey --export-secret-keys nihilist@nowhere.moe
</pre></code>
<img src="32.png" class="imgRz">
@ -862,14 +862,14 @@ iptables -A FORWARD -p tcp -d 10.8.0.3 --dport 80 -j ACCEPT
<p>The SSL certificates are there:</p>
<pre><code class="nim">
root@mail:/etc/letsencrypt/live/mail.nihilism.network# ls -lash
root@mail:/etc/letsencrypt/live/mail.nowhere.moe# ls -lash
total 12K
4.0K drwxr-xr-x 2 root root 4.0K Dec 4 18:17 .
4.0K drwx------ 3 root root 4.0K Dec 4 18:17 ..
0 lrwxrwxrwx 1 root root 45 Dec 4 18:17 cert.pem -> ../../archive/mail.nihilism.network/cert1.pem
0 lrwxrwxrwx 1 root root 46 Dec 4 18:17 chain.pem -> ../../archive/mail.nihilism.network/chain1.pem
0 lrwxrwxrwx 1 root root 50 Dec 4 18:17 fullchain.pem -> ../../archive/mail.nihilism.network/fullchain1.pem
0 lrwxrwxrwx 1 root root 48 Dec 4 18:17 privkey.pem -> ../../archive/mail.nihilism.network/privkey1.pem
0 lrwxrwxrwx 1 root root 45 Dec 4 18:17 cert.pem -> ../../archive/mail.nowhere.moe/cert1.pem
0 lrwxrwxrwx 1 root root 46 Dec 4 18:17 chain.pem -> ../../archive/mail.nowhere.moe/chain1.pem
0 lrwxrwxrwx 1 root root 50 Dec 4 18:17 fullchain.pem -> ../../archive/mail.nowhere.moe/fullchain1.pem
0 lrwxrwxrwx 1 root root 48 Dec 4 18:17 privkey.pem -> ../../archive/mail.nowhere.moe/privkey1.pem
4.0K -rw-r--r-- 1 root root 692 Dec 4 18:17 README
</code></pre>
@ -884,13 +884,13 @@ certbot --nginx --force-renew
root@mail:~# vim /etc/dovecot/conf.d/10-ssl.conf
root@mail:~# cat /etc/dovecot/conf.d/10-ssl.conf | grep ssl_key
#ssl_key = <<b></b>/etc/dovecot/private/dovecot.key
ssl_key = <<b></b>/etc/letsencrypt/live/mail.nihilism.network/privkey.pem
ssl_key = <<b></b>/etc/letsencrypt/live/mail.nowhere.moe/privkey.pem
# root owned 0600 file by using ssl_key_password = <<b></b>path.
#ssl_key_password =
root@mail:~# cat /etc/dovecot/conf.d/10-ssl.conf | grep ssl_cert
#ssl_cert = <<b></b>/etc/dovecot/private/dovecot.pem
ssl_cert = <<b></b>/etc/letsencrypt/live/mail.nihilism.network/fullchain.pem
ssl_cert = <<b></b>/etc/letsencrypt/live/mail.nowhere.moe/fullchain.pem
#ssl_cert_username_field = commonName
@ -918,14 +918,14 @@ ssl_cert = <<b></b>/etc/letsencrypt/live/mail.nihilism.network/fullchain.pem
<h4>My Links</h4>
<p>
<a target="_blank" rel="noopener noreferrer" href="http://blog.nihilism.network/rss/feed.xml">RSS Feed</a><br/><a target="_blank" rel="noopener noreferrer" href="https://matrix.to/#/#nihilism:m.datura.network">Matrix Chat</a><br/>
<a target="_blank" rel="noopener noreferrer" href="http://blog.nowhere.moe/rss/feed.xml">RSS Feed</a><br/><a target="_blank" rel="noopener noreferrer" href="https://matrix.to/#/#nihilism:m.nowhere.moe">Matrix Chat</a><br/>
</p>
</div><!-- /col-lg-4 -->
<div class="col-lg-4">
<h4>About nihilist</h4>
<p style="word-wrap: break-word;"><u>Donate XMR:</u> 8AUYjhQeG3D5aodJDtqG499N5jXXM71gYKD8LgSsFB9BUV1o7muLv3DXHoydRTK4SZaaUBq4EAUqpZHLrX2VZLH71Jrd9k8</p></br><p><u>Contact:</u> nihilist@nihilism.network (<a href="https://nihilism.network/nihilist.pubkey">PGP</a>)</p>
<p style="word-wrap: break-word;"><u>Donate XMR:</u> 8AUYjhQeG3D5aodJDtqG499N5jXXM71gYKD8LgSsFB9BUV1o7muLv3DXHoydRTK4SZaaUBq4EAUqpZHLrX2VZLH71Jrd9k8</p></br><p><u>Contact:</u> nihilist@nowhere.moe (<a href="https://nowhere.moe/nihilist.pubkey">PGP</a>)</p>
</div><!-- /col-lg-4 -->
</div>