Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nginx-subdomain-randomizer

Random subdomain generator settings for nginx and cloudflare

Quick start

First, prepare your Linux server* with a fresh install of Ubuntu, Debian or etc.

Use this one line code to install and configure nginx:

wget https://raw.githubusercontent.com/JustUnknownDude/Nginx-subdomain-randomizer/main/quickstart.sh && bash quickstart.sh

Next steps

Add a cron job to generate and replace subdomains

  1. Open crontab
crontab -e
  1. Paste this command
*/2 * * * * bash /random.sh >> /dev/null

Route your domain via Cloudlfare

All you have to do is sign up for a free account.

Add your domain and specify the DNS of the cloudflare server at the domain registrar

Specify A-records for your domain in cloudflare: yourdomain.com *.yourdomain.com

Open yourdomain.com/fref/ in browser.

Done.

Description of files in the repository:

quickstart.sh

This is a bash script to quickly expand the contents of the rest of the files on the server

all.conf

Config for nginx that listens on yourdomain.com/fref/ and redirects to a subdomain that is randomly generated by the random.sh file. In the config, there is a further redirect to the target server with the site. You can also host the site immediately on this server, just edit the config a little to fit your goals.

random.sh

The script generates a new subdomain randomly and replaces it in the nginx config.

bots.conf

Just a list with bots to block them with nginx. For the main task is not important.

About

Random subdomain generator settings for nginx and cloudflare

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages