Qortal Project

The future of blockchain platforms

User Tools

Site Tools


hardware_-_firewall_rules

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
hardware_-_firewall_rules [10/09/2019 02:38] gfactorhardware_-_firewall_rules [09/10/2020 05:39] gfactor
Line 1: Line 1:
-====== Netfilter Tutorial -  How To Secure Your QORT Router and Network Devices Connected To It ===+====== Netfilter Tutorial -  How To Secure Your Qortal Router and Network Devices Connected To It ===
 \\ ====== \\ ======
  
Line 29: Line 29:
  
  
-This section assumes that you are already SSH'ed into the QORT router. Look at Getting Started [[hardware_-_getting_started|Getting Started]]+This section assumes that you are already SSH'ed into the Qortal router. Look at Getting Started [[hardware_-_getting_started|Getting Started]]
  
 * iptables -L -v (list current firewall rules) \\ * iptables -L -v (list current firewall rules) \\
Line 48: Line 48:
 //**Block Outoing DNS**// /sbin/iptables -A OUTPUT -p udp  --dport 53 -j DROP \\  //**Block Outoing DNS**// /sbin/iptables -A OUTPUT -p udp  --dport 53 -j DROP \\ 
  
-//**Block incoming port:**// /sbin/iptables -A INPUT -p tcp --destination-port {PORT-NUMBER-HERE} -j DROP. //It works same as outgoing port syntax. Simply enter port numbers of running services you do not want accessed outside your network.// +//**Block incoming port:**// /sbin/iptables -A INPUT -p tcp --destination-port {PORT-NUMBER-HERE} -j DROP. //It works same as outgoing port syntax. Simply enter port numbers of running services you do not want accessed outside your network. If you wish to allow only a particular IP on any port or service then use -s IP_Address after DROP // 
  
 Examples: \\ Examples: \\
Line 54: Line 54:
 //**Block HTTP**// /sbin/iptables -A INPUT -p tcp --destination-port 80 -j DROP \\ //**Block HTTP**// /sbin/iptables -A INPUT -p tcp --destination-port 80 -j DROP \\
 //**Block HTTPS**// /sbin/iptables -A INPUT -p tcp --destination-port 443 -j DROP \\ //**Block HTTPS**// /sbin/iptables -A INPUT -p tcp --destination-port 443 -j DROP \\
 +//**Block HTTPS**// /sbin/iptables -A INPUT -p tcp -s IP_to_Block --destination-port 443 -j DROP \\
  
 ==== Monitoring Traffic Flow on Router ==== ==== Monitoring Traffic Flow on Router ====
  
  
-It is fairly simple to view what is happening on the router. The pre-installed utility "tcpdump" does all that in a human readable view. The QORT Router comes ready with either your own recursive DNS or a DNS forwarded and to monitor all your DNS lookups, you simple paste this command in terminal: \\+It is fairly simple to view what is happening on the router. The pre-installed utility "tcpdump" does all that in a human readable view. The Qortal Router comes ready with either your own recursive DNS or a DNS forwarded and to monitor all your DNS lookups, you simple paste this command in terminal: \\
  
  //tcpdump port 53 and '(tcp-syn|tcp-ack)!=0'  //tcpdump port 53 and '(tcp-syn|tcp-ack)!=0'
 // \\ // \\
  
-Note that port 53 is used for DNS queries. If you want to see the web site traffic, replace it with port 80.+Note that port 53 is used for DNS queries. If you want to see the web site traffic, replace it with port 80. \\ 
 + 
 +Example for more custom firewall rules, traffic monitoring can be obtained from official Discord
  
 ==== Monitoring Tor Flow on Router ===== ==== Monitoring Tor Flow on Router =====
Line 69: Line 72:
  
  
-The QORT Router comes ready with your own Tor dedicated gateway. You can use it for all types of internet traffic on the router itself and on connected devices such as browsers, QT wallets, Torrents for safety and privacy which is a big deal these days.\\+The Qortal Router comes ready with your own Tor dedicated gateway. You can use it for all types of internet traffic on the router itself and on connected devices such as browsers, QT wallets, Torrents for safety and privacy which is a big deal these days.\\
 {{ :nyx.png?400 |}} {{ :nyx.png?400 |}}
  
 For details on Tor access and it's utilization for connected, head over to [[hardware_-_service_access|Service Access]] For details on Tor access and it's utilization for connected, head over to [[hardware_-_service_access|Service Access]]
hardware_-_firewall_rules.txt · Last modified: 02/20/2023 19:08 by quickmythril