From 52094d584d0f1d9f5b23619bf1d1c1f4e9a5ccdd Mon Sep 17 00:00:00 2001
From: niharokz
Date: Thu, 1 Jul 2021 09:52:14 +0530
Subject: Gemini Protocol Added
---
gemini.html | 114 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 114 insertions(+)
create mode 100644 gemini.html
diff --git a/gemini.html b/gemini.html
new file mode 100644
index 0000000..08d5095
--- /dev/null
+++ b/gemini.html
@@ -0,0 +1,114 @@
+
+
+
+ How to set up your own gemini server
+
+
+
+
+
+
+
+ Creating and serving gemini capsules
+
+
+ What is Gemini?
+ Gemini is a new internet protocol which is different from the web. It's neither Gopher. It's much cleaner.
+ Why use gemini protocol?
+
+ Gemini capsules (webpages of gemini) are lightweight, minimal, and don't use many resources to operate.
+ It can run along with your websites. Gemini capsules use port 1965 by default. Your webserver can run at port 80 or 443 along with gemini server at port 1965.
+ By exploring an alternative protocol, you can check different ways to serve data and blogs.
+
+ To access any gemini urls i.e. gemini://landchad.net, you can use any gemini client such as amfora , lagrange , elpher , etc.
+
Instructions
+ To create and serve a gemini capsule, we need three basic steps:
+
+ Content
+ TLS certificate
+ Gemini server
+
+ We can create three different directories to simplify the process:
+
+mkdir -p gemini/{content,certificate,server}
+
+ Content
+ Gemini uses text/gemini markup. It heavily borrows from Markdown. Similar to .html or .md, gemini uses .gmi as its extension.
+ To create one gemini file, go inside the content directory and create one index.gmi file.
+
+touch gemini/content/index.gmi
+
+ Update the file content of index.gmi
+
+# This is Sample Gemini page
+## With header 1 and header 2
+And a short paragraph like this.
+=> /index.gmi Link to the same page
+
+ TLS certificate
+ Go to the certificate directory which we have created earlier. Generate the TLS certificate using OpenSSL. Change YOURDOMAIN.COM to the domain of your gemini capsule.
+
+openssl req -new -subj "/CN=YOURDOMAIN.COM" -x509 -newkey ec -pkeyopt ec_paramgen_curve:prime256v1 -days 3650 -nodes -out cert.pem -keyout key.pem
+
+ Gemini server
+ There are many gemini servers available. You can check the list of servers here .
+ We will use agate server for now. This is a simple gemini server written in Rust. Go to server directory and download agate server.
+
+wget https://github.com/mbrubeck/agate/releases/download/v3.1.0/agate.x86_64-unknown-linux-gnu.gz
+
+ Unzip the gz
+
+gunzip agate.x86_64-unknown-linux-gnu.gz
+
+ Rename and make it executable
+
+mv agate.x86_64-unknown-linux-gnu agate-server
+chmod +x agate-server
+
+ Now we need to create a systemd service
+
+sudo touch /etc/systemd/system/agate.service
+
+ Copy the below file and paste in agate.service.
+
+[Unit]
+Description=agate
+After=network.target
+
+[Service]
+User=USER
+Type=simple
+ExecStart=/home/USER/gemini/agate-server --content /home/USER/gemini/content --certs /home/USER/gemini/certificate/ --hostname YOURDOMAIN.COM --lang en-US
+
+[Install]
+WantedBy=default.target
+
+
+ Change /home/USER/gemini to your gemini directory path.
+ Change YOURDOMAIN.COM to your domain without http/https.
+ Change en-US to your country language. en-IN for India, en-GB for UK, etc.
+
+ Now we are ready to run server. Enable and run agate server.
+
+sudo systemctl enable agate
+
+sudo systemctl start agate
+ Finalization
+ Now your server should be running. If everything went okay, you can access your gemini via any gemini client with this url
+
+gemini://YOURDOMAIN.COM
+
+ Sample gemini site for reference:
+
+gemini://gemini.circumlunar.space
+
+ Enjoy your first gemini capsule.
+
+ Written by nihar.page
+
+
+
+
+ LandChad.net Because Everyone should be an Internet LandChad.
+
+
--
cgit v1.2.3
From 73ced75cda933f43113e3262d5171311c68bbfaf Mon Sep 17 00:00:00 2001
From: el3ctr0lyte <69082962+el3ctr0lyte@users.noreply.github.com>
Date: Thu, 1 Jul 2021 09:10:05 +0200
Subject: Updated tor guide
---
tor.html | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/tor.html b/tor.html
index 0d54b5f..52941ed 100644
--- a/tor.html
+++ b/tor.html
@@ -25,9 +25,20 @@
Setting up Tor
- First, install tor. On Debian it's as simple as:
+ Firstly we need to add the tor repo's to have the latest up to date version or tor.
- apt install tor
+ echo "deb https://deb.torproject.org/torproject.org buster main" > /etc/apt/sources.list.d/
+ echo "deb-src https://deb.torproject.org/torproject.org buster main" >> /etc/apt/sources.list.d/
+
+ Then we need to add the gpg keys to our keyring
+
+ curl https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc | gpg --import
+ gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | apt-key add -
+
+ Now update and install tor
+
+ apt update
+ apt install tor deb.torproject.org-keyring
Then edit the file /etc/tor/torrc, uncommenting the following lines:
HiddenServiceDir /var/lib/tor/hidden_service/
@@ -72,6 +83,10 @@
From here we are almost done, all we have to do is enable the site and reload nginx which is also covered in the webserver tutorial .
+ Also make sure to update tor on a regular basis by running
+ apt update
+ apt install tor
+
Contributor - tomfasano.xyz
--
cgit v1.2.3
From 49f45ee59d713b53c96e77cf93ecc05b8a016037 Mon Sep 17 00:00:00 2001
From: el3ctr0lyte <69082962+el3ctr0lyte@users.noreply.github.com>
Date: Thu, 1 Jul 2021 09:15:11 +0200
Subject: Update tor.html
---
tor.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tor.html b/tor.html
index 52941ed..fb8c896 100644
--- a/tor.html
+++ b/tor.html
@@ -26,7 +26,7 @@
Setting up Tor
Firstly we need to add the tor repo's to have the latest up to date version or tor.
-
+ apt install apt-transport-https
echo "deb https://deb.torproject.org/torproject.org buster main" > /etc/apt/sources.list.d/
echo "deb-src https://deb.torproject.org/torproject.org buster main" >> /etc/apt/sources.list.d/
--
cgit v1.2.3
From eb18006d34821e3309acc8fd48633762cee301a4 Mon Sep 17 00:00:00 2001
From: el3ctr0lyte <69082962+el3ctr0lyte@users.noreply.github.com>
Date: Thu, 1 Jul 2021 09:33:53 +0200
Subject: Update tor.html
---
tor.html | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tor.html b/tor.html
index fb8c896..5b5aa41 100644
--- a/tor.html
+++ b/tor.html
@@ -27,8 +27,8 @@
Firstly we need to add the tor repo's to have the latest up to date version or tor.
apt install apt-transport-https
- echo "deb https://deb.torproject.org/torproject.org buster main" > /etc/apt/sources.list.d/
- echo "deb-src https://deb.torproject.org/torproject.org buster main" >> /etc/apt/sources.list.d/
+ echo "deb https://deb.torproject.org/torproject.org buster main" > /etc/apt/sources.list.d/tor
+ echo "deb-src https://deb.torproject.org/torproject.org buster main" >> /etc/apt/sources.list.d/tor
Then we need to add the gpg keys to our keyring
--
cgit v1.2.3
From b36d214114f24323be0d69f2834bded0af91af87 Mon Sep 17 00:00:00 2001
From: Ashish Panigrahi
Date: Thu, 1 Jul 2021 13:34:56 +0530
Subject: fixed typo
---
bitcoin.html | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bitcoin.html b/bitcoin.html
index ce3206b..ec41f23 100644
--- a/bitcoin.html
+++ b/bitcoin.html
@@ -46,10 +46,10 @@
These words are your money.
Once you are shown them, immediately write them down on physical paper, and you will be storing this somewhere it will not be lost or found.
- You can memorize these tweleve words if you trust your memory.
+ You can memorize these twelve words if you trust your memory.
- These tweleve words unlock all of the funds/addresses you will have on this wallet.
+ These twelve words unlock all of the funds/addresses you will have on this wallet.
Whoever has your seed has the ability to spend your money.
Note obviously that I have included a picture of a seed phrase above in this tutorial.
--
cgit v1.2.3
From d6f2ba4d5f73192157f8f93f65a2314736e2333c Mon Sep 17 00:00:00 2001
From: MasterMax13124
Date: Thu, 1 Jul 2021 12:35:23 +0200
Subject: Fixed typos, slightly improved phrasing
---
sshkeys.html | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/sshkeys.html b/sshkeys.html
index 53382ee..24154ba 100644
--- a/sshkeys.html
+++ b/sshkeys.html
@@ -18,15 +18,15 @@
This allows us to do two main things:
- Password-less login : With SSH keys, we can permanently designate our profile on our local computer as safe for hour server, allowing us to bypass password verification when logging into our server.
+ Password-less login : With SSH keys, we can permanently designate our profile on our local computer as safe for our server, allowing us to bypass password verification when logging into our server.
Prevent hacking : Since we no longer need a password to log in, we can simply deactivate password logins on our server altogether, which prevents hacking from people who may be so lucky as to guess our password!
- In order words, using an SSH key to login is both safer, faster and easier .
+ In other words, using an SSH key to login is both safer, faster and easier .
- This is especially better once you start making scripts on your computer that interact with your server.
+ This is especially useful once you start making scripts on your computer that interact with your server.
You can upload files in the background, edit your spam filters or anything else from your local computer without having to input
your password each time you touch the server.
@@ -58,15 +58,15 @@
Making your server trust your key.
- Now that you have an SSH key generate, just run the following:
+ Now that you have generated an SSH key, just run the following:
ssh-copy-id root@yourdomain.com
- That will ask for your server's root password and will log you in briefly.
+ The command will ask for your server's root password and log you in briefly.
What this does is that it puts your public SSH key fingerprint on your server in a file /root/.ssh/authorized_keys.
- What this does is that it allows approved SSH keys to login without passwords.
+ This file in turn allows approved SSH keys to log in without passwords.
@@ -83,7 +83,7 @@
ssh root@yourdomain.com
- It should now let your log in without a password prompt!
+ It should now let you log in without a password prompt!
@@ -107,7 +107,7 @@
Once we have authorized ssh keys for all the devices we need, we can actually just disable password logins.
If you've ever looked at your system logs (journalctl -xe) you will find that there are always hundreds of random Chinese computers trying to brute force every server connected to the internet with random passwords.
- They usually always are unsuccessful, but let's make it impossible for them.
+ They are usually unsuccessful, but let's make it impossible for them.
@@ -124,7 +124,7 @@ ChallengeResponseAuthentication no
UsePAM no
- Once we've done that, we will reload hour SSH daemon:
+ Once we've done that, we will reload our SSH daemon:
systemctl reload sshd
@@ -142,11 +142,11 @@ UsePAM no
What if I lose my SSH key?!
- Firstly, don't do this. Make every precaution that you have a backup.
+ Firstly, don't do this. Take every precaution that you have a backup.
- If this does happens, Vultr and most other VPS providers will have one little out.
+ If this does happen, Vultr and most other VPS providers will have a way out.
Log onto their website and select the server you want to log into.
@@ -163,7 +163,7 @@ UsePAM no
- From here, simply reverse the settings we set above and you can login via SSH with a password and you can reapprove a newly created SSH key or whatever you want to do.
+ From here, simply reverse the settings we set above and you can log in via SSH with a password and reapprove a newly created SSH key or whatever you want to do.
--
cgit v1.2.3
From 0f329b39023b3db4b849818596cc689b5267a79f Mon Sep 17 00:00:00 2001
From: Luke Smith
Date: Thu, 1 Jul 2021 07:14:21 -0400
Subject: fix tor screw-ups
---
tor.html | 48 +++++++++++++++++++++++++-----------------------
1 file changed, 25 insertions(+), 23 deletions(-)
diff --git a/tor.html b/tor.html
index 5b5aa41..bbe8147 100644
--- a/tor.html
+++ b/tor.html
@@ -17,32 +17,31 @@
Now that you have a website, why not offer it on a private alternative such as the onion network?
-
- LandChad.net does not condone
- any illegal activities or websites on the dark web nor the usage of
- this tutorial to launch such sites.
-
Setting up Tor
+ Installing Tor
+
Firstly we need to add the tor repo's to have the latest up to date version or tor.
- apt install apt-transport-https
- echo "deb https://deb.torproject.org/torproject.org buster main" > /etc/apt/sources.list.d/tor
- echo "deb-src https://deb.torproject.org/torproject.org buster main" >> /etc/apt/sources.list.d/tor
-
+ apt install -y apt-transport-https gpg
+echo "deb https://deb.torproject.org/torproject.org buster main
+deb-src https://deb.torproject.org/torproject.org buster main" > /etc/apt/sources.list.d/tor.list
+
Then we need to add the gpg keys to our keyring
-
- curl https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc | gpg --import
- gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | apt-key add -
-
+
+ curl -s https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc | gpg --import
+gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | apt-key add -
+
Now update and install tor
-
- apt update
- apt install tor deb.torproject.org-keyring
+
+ apt update
+apt install tor deb.torproject.org-keyring
+
+ Enabling Tor
Then edit the file /etc/tor/torrc, uncommenting the following lines:
- HiddenServiceDir /var/lib/tor/hidden_service/
- HiddenServicePort 80 127.0.0.1:80
+ HiddenServiceDir /var/lib/tor/hidden_service/
+HiddenServicePort 80 127.0.0.1:80
Optional: Running multiple onion services
If you want to forward multiple virtual ports for a single onion
@@ -83,11 +82,14 @@
From here we are almost done, all we have to do is enable the site and reload nginx which is also covered in the webserver tutorial .
- Also make sure to update tor on a regular basis by running
- apt update
- apt install tor
-
- Contributor - tomfasano.xyz
+
+ Update regularly!
+
+ Make sure to update Tor on a regular basis by running:
+ apt update
+apt install tor
+
+ Contributor - tomfasano.xyz
LandChad.net Because Everyone should be an Internet LandChad.
--
cgit v1.2.3
From 5d01664f0ec4034d5915a326c4d801cf1327d3fc Mon Sep 17 00:00:00 2001
From: Luke Smith
Date: Thu, 1 Jul 2021 07:16:30 -0400
Subject: test of sup/lb for RSS
---
rss.xml | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 76 insertions(+)
diff --git a/rss.xml b/rss.xml
index b37b9e3..d621a10 100644
--- a/rss.xml
+++ b/rss.xml
@@ -13,6 +13,82 @@
https://landchad.net/rss.xml
+
+
+-
+
Mirror your site over tor
+https://lukesmith.xyz/tor.html
+ https://lukesmith.xyz/tor.html
+Thu, 01 Jul 2021 07:15:39 -0400
+Mirror Your Site Over Tor
+
+
+
+
+ Now that you have a website, why not offer it on a private alternative such as the onion network?
+
+ Setting up Tor
+ Installing Tor
+ Firstly we need to add the tor repo's to have the latest up to date version or tor.
+ apt install -y apt-transport-https gpg
+echo "deb https://deb.torproject.org/torproject.org buster main
+deb-src https://deb.torproject.org/torproject.org buster main" > /etc/apt/sources.list.d/tor.list
+ Then we need to add the gpg keys to our keyring
+ curl -s https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc | gpg --import
+gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | apt-key add -
+ Now update and install tor
+ apt update
+apt install tor deb.torproject.org-keyring
+ Enabling Tor
+ Then edit the file /etc/tor/torrc, uncommenting the following lines:
+ HiddenServiceDir /var/lib/tor/hidden_service/
+HiddenServicePort 80 127.0.0.1:80
+
+ Optional: Running multiple onion services
+ If you want to forward multiple virtual ports for a single onion
+ service, just add more HiddenServicePort lines (replace the 80 with any unoccupied port).
+
+ If you want to run multiple onion services from the same Tor client, just add another
+ HiddenServiceDir line.
+
+ Now start and enable tor at boot
+ systemctl enable --now tor
+ If the next command outputs active in green you're golden!
+ systemctl status tor
+ Now you're server is on the dark web. The following command will give you your onion address:
+ cat /var/lib/tor/hidden_service/hostname
+ Adding the Nginx Config
+
+ From here, the steps are almost identical to setting up a normal website configuration file.
+ Follow the steps as if you were making a new website on the webserver
+ tutorial up until the server block of code. Instead, paste this:
+
+ server {
+ listen 127.0.0.1:80 ;
+ root /var/www/landchad ;
+ index index.html ;
+ server_name your-onion-address .onion ;
+ }
+
+ Clarification
+ Nginx will listen on port 80 for your server's localhost.
+ The root line is the path to whichever website of yours you'd like to mirror.
+
+
+ From here we are almost done, all we have to do is enable the site and reload nginx which is also covered in the webserver tutorial .
+
+ Update regularly!
+ Make sure to update Tor on a regular basis by running:
+ apt update
+apt install tor
+ Contributor - tomfasano.xyz
+
+
+]]>
+
+
+
-
Cryptocurrency Tutorials Completed
https://landchad.net/index.html#crypto
--
cgit v1.2.3
From ffede62f039d56a2cbedee7a5bb61764661753e8 Mon Sep 17 00:00:00 2001
From: Luke Smith
Date: Thu, 1 Jul 2021 07:20:36 -0400
Subject: rss updates
---
rss.xml | 388 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 388 insertions(+)
diff --git a/rss.xml b/rss.xml
index d621a10..edd03b9 100644
--- a/rss.xml
+++ b/rss.xml
@@ -15,6 +15,394 @@
+-
+
Hosting Your Own Git Repositories – LandChad.net
+https://lukesmith.xyz/git.html
+ https://lukesmith.xyz/git.html
+Thu, 01 Jul 2021 07:19:51 -0400
+Hosting Your Own Git Repositories
+
+
+
+
+ Once you have your own VPS or other Internet-available server, you can
+ start hosting your own git repositories. The goal of this tutorial is
+ for you to go from
+ git clone github.com/...
+ to
+ git clone YourLandChadDomainName.xyz/...
+
+ so you can cultivate your own homegrown, grass-fed code, rather than
+ relying on a centralized proprietary service like GitHub.
+
+ Installing git
+
+ You most likely already have it installed on your server, but if not,
+ run:
+ apt install git
+
+ We don't need any additional software, git itself ships
+ with everything needed to host a remote repository!
+
+ Creating bare repositories
+
+ For each repository you want to host, you will need to manually create
+ what's called a "bare" repository on your server. These hold all the
+ commits and any other git data needed for your repository, but without
+ an expanded "index" in which you can just browse all the files of a
+ certain commit in the file system.
+
+
+ These repositories need to be owned by the git user, and
+ you should probably pick a directory where you will store them all. One
+ sane choice is under /srv/git/, and we will use this as the
+ example directory for the rest of the tutorial, but any other path will
+ do as well.
+
+ Become the git user and create the directory
+
+ If you're logged in to your server as root and have git
+ installed, you can become the git user by executing
+
+ su git
+
+ Now navigate to/create your desired directory, for example
+
+ cd /srv
+mkdir git
+ Create the repo
+
+ Now you can create the bare repository with
+
+ git init --bare my-repo.git
+
+ By convention, bare repository names end with ".git".
+
+
+ Repeat the above command for any other repositories you want to host.
+
+ Syncing local repositories with your server
+ Set up SSH login for the git user
+
+ You will need to be able to login remotely via ssh as the
+ git user we've used before. To do this, you will either
+ need to set up a password for the git user by running
+ passwd git,
+ or copy your public SSH key from your local machine to
+ /home/git/.ssh/authorized_keys.
+ See the SSH keys instructional for details
+ (just log in as git instead of root).
+
+ Syncing a new repository with your server
+
+ If you've just created a new repository on your local machine, you will
+ need to tell git where the remote repository is to be able
+ to sync with it (using commands like git push or
+ git pull). We do this by defining a "remote" for your
+ repository.
+
+
+ A remote is just a named URL remembered in your repo's configuration. So
+ we need a name and a URL. By convention, the "main" remote is called
+ "origin". The URL has the format user@host:path, where:
+
+
+
+ user is git, the git user
+ we've already worked with before.
+
+
+ host is your domain name.
+ Alternatively you could even use your server's raw IP address.
+
+
+ path is the absolute path to the repository on the
+ server, in our example /srv/git/my-repo.git
+
+
+
+
+ So, to create a new remote, run:
+
+ git remote add origin git@yourdomain.xyz:/srv/git/my-repo.git
+
+ Now you'll be able to run git push origin master to push
+ your commits or git pull origin to pull from the remote.
+
+ Syncing an existing repository
+
+ If you've already set up your local repository to sync with a service
+ like GitHub it probably already has a remote called "origin". You can
+ see your repo's remotes with:
+
+ git remote -v
+
+ You can follow the above instructions, substituting an arbitrary other
+ name other than "origin" to create a differently named remote, e.g.
+
+ git remote add vps git@...
+
+ Now you'll be able to push/pull with git push vps master
+ and git pull vps, respectively.
+
+
+ Or, to completely sever ties with your centralized git provider, first
+ remove the original origin with:
+ git remote remove origin
+ and then follow the instructions as above.
+
+ Contribution
+
+
+
+]]>
+
+
+
+-
+
Requiring Passwords for Webpages (HTTP Authentication) – LandChad.net
+https://lukesmith.xyz/auth.html
+ https://lukesmith.xyz/auth.html
+Thu, 01 Jul 2021 07:19:27 -0400
+Requiring Passwords for Webpages
+
+
+
+ HTTP basic authentication will allow you to secure parts (or all) of your website with a username and password without the trouble of PHP or Javascript.
+ This will work with any Nginx server.
+
+ Installation
+ We will be using the command htpasswd to make username and password pairs.
+ apt install apache2-utils
+
+ The apache utils has a small username-password pair encryption tool.
+ Like the other on this site, this tutorial is for Nginx, not for Apache servers.
+
+
+ Now think of a username and password and remember them.
+
+ htpasswd -c /etc/nginx/myusers username
+
+ The -c flag creates a file. You can make the path of this file anywhere outside of your webroot.
+ Obviously the username is up to you as well.
+
+
+ Type out your password twice to confirm. You can do this as many times as you'd like.
+
+ Check out user name password pairs (the password will be securely hashed):
+ cat /etc/nginx/myusers
+ Nginx Config and Auth Basic
+
+ From here, we are going to edit our websites config file in /etc/nginx/sites-enabled.
+ Have in mind which folder you'd like to secure. Add something like this:
+
+ server {
+ #...
+ location /secret-folder {
+ auth_basic "What's the Password?" ;
+ auth_basic_user_file /etc/nginx/myusers ;
+ }
+ #...
+}
+
+ Huh?
+ If you're stuck, try finding the line location / {
+ Just below this block is where you should add the custom location block
+
+ If you'd like to do the opposite, such as making the entire site private except for a public section, do this:
+ server {
+ #...
+ auth_basic "What's the Password?" ;
+ auth_basic_user_file /etc/nginx/myusers ;
+ location /public / {
+ #...
+ auth_basic off ;
+ }
+ #...
+}
+ IP Addresses
+ If passwords aren't enough we can ban an ip or accept one.
+ location /api {
+ #...
+ allow 192.168.1.23:8080 ;
+ deny 127.0.0.1 ;
+}
+ If you want to check both a username and password with an ip address, use the satisfy directive.
+ location /api {
+ #...
+ satify all ;
+ allow 192.168.1.23:8080 ;
+ deny 127.0.0.1 ;
+ auth_basic "What's the Password?" ;
+ auth_basic_user_file /etc/nginx/myusers ;
+}
+ Complete Example
+ http {
+ server {
+ listen 80;
+ root /var/www/website ;
+ #...
+ location /secret-folder {
+ satisfy all ;
+ allow 192.168.1.3/24;
+ deny 127.0.0.1 ;
+ auth_basic "What's the Password?" ;
+ auth_basic_user_file /etc/nginx/myusers ;
+ }
+ }
+}
+
+ Now check your configuration with nginx -t
+
+ Reload nginx and you're good to go!
+ Contributor - tomfasano.xyz
+
+
+]]>
+
+
+
+-
+
Cronjobs – LandChad.net
+https://lukesmith.xyz/cron.html
+ https://lukesmith.xyz/cron.html
+Thu, 01 Jul 2021 07:19:04 -0400
+Using Cronjobs to run scheduled tasks
+
+
+
+ Cron is a service that lets you run scheduled tasks. These tasks are called cronjobs. If you have already followed the initial course you will have already used cron when you set up certbot.
+
+ What tasks would I want to schedule?
+
+ You can schedule anything! Some examples of what you might have done already include:
+
+ updatedb to update your locate database
+ certbot to update renewing of your https certs
+
+ Some tasks that you might want to schedule may include:
+
+ Package updates - if you really just want to leave your server alone you can automated updating packages on your server
+ Backups - you may want to backup certain files every day and some every week, this is possible with cron
+
+
+ And many more, anything you can do can be turned into a cronjob.
+
+ Basic Cronjobs
+
+ This the preferred method for personal tasks and scripts, it's also the easiest to get started with. Run the command crontab -e to access your users crontab
+
+
+ Once you have figured out the command you want to run you need to figure out how often you want to run it and when. I am going to schedule my system updates once a week on at 3:30 AM on a Monday.
+
+
+ We now have to convert this time (Every Monday at 3:30 AM) into a cron time. Cron uses a simple but effective way of scheduling when to run things.
+
+
+ Crontab expressions look like this * * * * * command-to-run
+ The five elements before the command tell when the command is supposed to be run automatically.
+
+ So for our Monday at 3:30AM job we would do the following:
+
+
.---------------- minute (0 - 59)
+ | .------------- hour (0 - 23)
+ | | .---------- day of month (1 - 31)
+ | | | .------- month (1 - 12
+ | | | | .---- day of week (0 - 6)
+ | | | | |
+ * * * * *
+30 3 * * 1 apt -y update && apt -y dist-upgrade
+ Some notes
+
+ On the day of the week option, Sunday is 0 and counting up from there, Saturday will be 6.
+ * designates "everything". Our command above has a * in the day of month and month columns. This means it will run regardless of the day of the month or month.
+ The hour option uses 24 hour time. 3 = 3AM, while use 15 for 3PM.
+
+ More examples
+
+ Let's add another job, our backup job (for the purposes of this our backup command is just called backup) We want to run backup Every evening at 11PM, once we work out the timings for this we can add the to the same file as the above by running crontab -e This would mean our full crontab would look like this:
+
0 23 * * * backup
+ Consecutive times
+
+ Suppose we want a command to run every weekday.
+ We know we can put 1 (Monday), but we can also use 1-5
+ to signify from day 1 (Monday) to day 5 (Friday).
+
+ 0 6 * * 1-5 echo "Wakey, wakey, wagie!" >> /home/wagie/alarm
+ The above echo command runs every Monday through Friday at 6:00AM.
+ Non-consecutive times
+
+ We can also randomly specify non-consecutive arguments with a comma.
+ Suppose you have a script you want to run at the midday of the 1st, 15th, and 20th day of every month.
+ You can specify that my putting 1,15,20 for the day of the month argument:
+
+ 0 12 1,15,20 * * /usr/bin/pay_bills_script
+ "Every X minutes/days/months"
+ We can also easily run a command very several minutes or months, without specifying the specific times:
+
+ */15 * * * * updatedb
+
+ This cronjob will run the updatedb command every 15 minutes.
+
+ Beware of this Rookie Mistake Though...
+
+ Suppose you want to run a script once every other month.
+ You might be tempted write this:
+
+ * * * */2 *
+
+ That might feel right , but this script will be running once every minute during that every other month .
+ You should specify the first two arguments, because with * it will be running every minute and hour!
+
+ 0 0 1 */2 *
+ This makes the command run only at 0:00 (12:00AM) on the first day of every two months, which is what we really want.
+
+ Consult the website crontab.guru for an intuitive and interactive tester of cronjobs.
+
+ User vs. Root Cronjobs
+
+ It is important to note that user accounts all have different cronjobs.
+ If you have a user account chad and edit his crontab with crontab -e,
+ the commands you add will be run as the chad user, not root or anyone else.
+
+
+ Bear in mind that if you need root access to run a particular command,
+ you will usually want to add it as root.
+
+ System-wide cron directories
+
+ crontab -e is the typical interface for adding cronjobs, but it's important to at least know that system-wide jobs are often stored in the file directory.
+ Some programs which need cronjobs will automatically install them in the following way.
+
+
+ Run the command ls /etc/cron* you should see a list of directories and there contents. The directories should be something like the below
+
+ /etc/cron.d This is a crontab like the ones that you create with crontab -e
+ /etc/cron.hourly
+ /etc/cron.daily
+ /etc/cron.weekly
+ /etc/cron.monthly
+
+
+ The directories cron.{hourly,daily,weekly,monthly} are where you can put scripts to run at those times. You don't put normal cron entries here. I prefer to use these directories for system wide jobs that don't relate to an individual user.
+
+ Contribution
+
+
+
+]]>
+
+
+
-
Mirror your site over tor
https://lukesmith.xyz/tor.html
--
cgit v1.2.3
From 22d0d755062fe8b4f8eef08e2faeb896d525ef35 Mon Sep 17 00:00:00 2001
From: Luke Smith
Date: Thu, 1 Jul 2021 07:34:26 -0400
Subject: oops
---
rss.xml | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/rss.xml b/rss.xml
index edd03b9..88f9a33 100644
--- a/rss.xml
+++ b/rss.xml
@@ -17,12 +17,12 @@
-
Hosting Your Own Git Repositories – LandChad.net
-https://lukesmith.xyz/git.html
- https://lukesmith.xyz/git.html
+https://landchad.net/git.html
+ https://landchad.net/git.html
Thu, 01 Jul 2021 07:19:51 -0400
Hosting Your Own Git Repositories
-
+
@@ -158,19 +158,19 @@ mkdir git
href="https://m-chrzan.xyz">website, donate
-
+
]]>
-
Requiring Passwords for Webpages (HTTP Authentication) – LandChad.net
-https://lukesmith.xyz/auth.html
- https://lukesmith.xyz/auth.html
+https://landchad.net/auth.html
+ https://landchad.net/auth.html
Thu, 01 Jul 2021 07:19:27 -0400
Requiring Passwords for Webpages
-
+
HTTP basic authentication will allow you to secure parts (or all) of your website with a username and password without the trouble of PHP or Javascript.
@@ -262,19 +262,19 @@ mkdir git
Reload nginx and you're good to go!
Contributor - tomfasano.xyz
-
+
]]>
-
Cronjobs – LandChad.net
-https://lukesmith.xyz/cron.html
- https://lukesmith.xyz/cron.html
+https://landchad.net/cron.html
+ https://landchad.net/cron.html
Thu, 01 Jul 2021 07:19:04 -0400
Using Cronjobs to run scheduled tasks
-
+
Cron is a service that lets you run scheduled tasks. These tasks are called cronjobs. If you have already followed the initial course you will have already used cron when you set up certbot.
@@ -398,15 +398,15 @@ mkdir git
Edits and examples by Luke
-
+
]]>
-
Mirror your site over tor
-https://lukesmith.xyz/tor.html
- https://lukesmith.xyz/tor.html
+https://landchad.net/tor.html
+ https://landchad.net/tor.html
Thu, 01 Jul 2021 07:15:39 -0400
Mirror Your Site Over Tor
--
cgit v1.2.3
From c03bc90ce47f1bf340f06f036b78c1483f005211 Mon Sep 17 00:00:00 2001
From: Luke Smith
Date: Thu, 1 Jul 2021 07:37:37 -0400
Subject: safety
---
cron.html | 2 +-
rss.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/cron.html b/cron.html
index 6b12269..3f61f23 100644
--- a/cron.html
+++ b/cron.html
@@ -56,7 +56,7 @@
| | | | .---- day of week (0 - 6)
| | | | |
* * * * *
-30 3 * * 1 apt -y update && apt -y dist-upgrade
+30 3 * * 1 apt -y update && apt -y upgrade
Some notes
diff --git a/rss.xml b/rss.xml
index 88f9a33..50dda18 100644
--- a/rss.xml
+++ b/rss.xml
@@ -317,7 +317,7 @@ mkdir git
| | | | .---- day of week (0 - 6)
| | | | |
* * * * *
-30 3 * * 1 apt -y update && apt -y dist-upgrade
+30 3 * * 1 apt -y update && apt -y upgrade
Some notes
On the day of the week option, Sunday is 0 and counting up from there, Saturday will be 6.
--
cgit v1.2.3
From f6e08e46491e1efc54628de717484efda1dbcf61 Mon Sep 17 00:00:00 2001
From: Luke Smith
Date: Thu, 1 Jul 2021 08:36:13 -0400
Subject: begin gemini tweaks
---
dns.html | 2 +-
gemini.html | 60 +++++++++++++++++-------------------------------------------
2 files changed, 18 insertions(+), 44 deletions(-)
diff --git a/dns.html b/dns.html
index d14ea02..3464eaa 100644
--- a/dns.html
+++ b/dns.html
@@ -115,7 +115,7 @@
- As you can see, our ping to landchad.net is now being directed to 104.238.126.105.
+ As you can see, our ping to landchad.net is now being directed to 104.238.128.105.
That means we have successfully set up our DNS records!
You can also run the command host if you have it, which will list both IPv4 and IPv6 addresses for a domain name.
diff --git a/gemini.html b/gemini.html
index 08d5095..2962d09 100644
--- a/gemini.html
+++ b/gemini.html
@@ -13,7 +13,7 @@
What is Gemini?
- Gemini is a new internet protocol which is different from the web. It's neither Gopher. It's much cleaner.
+ Gemini is a new internet protocol which is different from the HTTP and Gopher. It's much cleaner.
Why use gemini protocol?
-mkdir -p gemini/{content,certificate,server}
-
+ mkdir -p gemini/{content,certificate,server}
Content
Gemini uses text/gemini markup. It heavily borrows from Markdown. Similar to .html or .md, gemini uses .gmi as its extension.
To create one gemini file, go inside the content directory and create one index.gmi file.
-
-touch gemini/content/index.gmi
-
+ touch gemini/content/index.gmi
Update the file content of index.gmi
-
-# This is Sample Gemini page
+ # This is Sample Gemini page
## With header 1 and header 2
And a short paragraph like this.
-=> /index.gmi Link to the same page
-
+=> /index.gmi Link to the same page
TLS certificate
Go to the certificate directory which we have created earlier. Generate the TLS certificate using OpenSSL. Change YOURDOMAIN.COM to the domain of your gemini capsule.
-
-openssl req -new -subj "/CN=YOURDOMAIN.COM" -x509 -newkey ec -pkeyopt ec_paramgen_curve:prime256v1 -days 3650 -nodes -out cert.pem -keyout key.pem
-
+ openssl req -new -subj "/CN=YOURDOMAIN.COM" -x509 -newkey ec -pkeyopt ec_paramgen_curve:prime256v1 -days 3650 -nodes -out cert.pem -keyout key.pem
Gemini server
There are many gemini servers available. You can check the list of servers here .
We will use agate server for now. This is a simple gemini server written in Rust. Go to server directory and download agate server.
-
-wget https://github.com/mbrubeck/agate/releases/download/v3.1.0/agate.x86_64-unknown-linux-gnu.gz
-
+ wget https://github.com/mbrubeck/agate/releases/download/v3.1.0/agate.x86_64-unknown-linux-gnu.gz
Unzip the gz
-
-gunzip agate.x86_64-unknown-linux-gnu.gz
-
+ gunzip agate.x86_64-unknown-linux-gnu.gz
Rename and make it executable
-
-mv agate.x86_64-unknown-linux-gnu agate-server
-chmod +x agate-server
-
+ mv agate.x86_64-unknown-linux-gnu agate-server
+chmod +x agate-server
Now we need to create a systemd service
-
-sudo touch /etc/systemd/system/agate.service
-
+ sudo touch /etc/systemd/system/agate.service
Copy the below file and paste in agate.service.
-
-[Unit]
+ [Unit]
Description=agate
After=network.target
@@ -81,33 +64,24 @@ Type=simple
ExecStart=/home/USER/gemini/agate-server --content /home/USER/gemini/content --certs /home/USER/gemini/certificate/ --hostname YOURDOMAIN.COM --lang en-US
[Install]
-WantedBy=default.target
-
+WantedBy=default.target
Change /home/USER/gemini to your gemini directory path.
Change YOURDOMAIN.COM to your domain without http/https.
Change en-US to your country language. en-IN for India, en-GB for UK, etc.
Now we are ready to run server. Enable and run agate server.
-
-sudo systemctl enable agate
-
-sudo systemctl start agate
+ systemctl enable agate
+systemctl start agate
Finalization
Now your server should be running. If everything went okay, you can access your gemini via any gemini client with this url
-
-gemini://YOURDOMAIN.COM
-
+ gemini://example.org
Sample gemini site for reference:
-
-gemini://gemini.circumlunar.space
-
+ gemini://gemini.circumlunar.space
Enjoy your first gemini capsule.
Written by nihar.page
-
-
LandChad.net Because Everyone should be an Internet LandChad.