Skip to content

Instantly share code, notes, and snippets.

@4noha
Created April 11, 2018 05:53
Show Gist options
  • Save 4noha/a2c314d036a37ff9b0111d2539847fb5 to your computer and use it in GitHub Desktop.
Save 4noha/a2c314d036a37ff9b0111d2539847fb5 to your computer and use it in GitHub Desktop.
sudo apt install nginx
sudo apt-get -y install dnsmasq
sudo emacs /etc/dnsmasq.conf
# # Disables /etc/resolv.conf
# no-resolv
# no-poll
# # Never forward plain names (without a dot or domain part)
# domain-needed
# # Never forward addresses in the non-routed address spaces.
# bogus-priv
# # DNS addresses
# server=1.1.1.1
# server=8.8.8.8
sudo service dnsmasq start
nslookup www.example.com 192.168.16.2
cd
openssl genrsa 2048 > server.key
openssl req -new -key server.key > server.csr
openssl x509 -days 365 -req -signkey server.key < server.csr > server.crt
sudo mv server.* /etc/nginx/conf.d/
sudo emacs /etc/nginx/conf.d/ssl.conf
# server {
# listen 443 ssl;
# ssl on;
# ssl_certificate /etc/nginx/conf.d/server.crt;
# ssl_certificate_key /etc/nginx/conf.d/server.key;
# }
sudo service nginx start
sudo emacs /etc/hosts
# 127.0.0.1 dash-button-jp.amazon.com
# 127.0.0.1 dash-button-jp.amazon.com.https
# 127.0.0.1 parker-gateway-na.amazon.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment