From b354831f4cce2a3fd69b2870dbcd8b6d4ce3cb9e Mon Sep 17 00:00:00 2001 From: Reza Behzadan Date: Tue, 6 Aug 2024 23:01:40 +0330 Subject: [PATCH] Update README --- README.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index af8480f..33d6b6b 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,14 @@ ### Sample `iptables` rules ``` -sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8443 -sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 8443 -sudo ip6tables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8443 -sudo ip6tables -t nat -A PREROUTING -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 8443 +# IPv4 +sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8443 +sudo iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-port 8443 + +# IPv6 +sudo ip6tables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8443 +sudo ip6tables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-port 8443 + ``` ### Sample `dnsmasq` config @@ -14,6 +18,9 @@ sudo ip6tables -t nat -A PREROUTING -i eth0 -p tcp --dport 443 -j REDIRECT --to- no-dhcp-interface= enable-tftp=false +listen-address=0.0.0.0 +interface=eth0 + address=/#/185.218.139.254 ```