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
hardware_-_firewall_rules [09/10/2020 05:39] gfactorhardware_-_firewall_rules [02/20/2023 19:08] (current) – code formatting quickmythril
Line 33: Line 33:
 * iptables -L -v (list current firewall rules) \\ * iptables -L -v (list current firewall rules) \\
 * iptables -F (flush all rules) \\ * iptables -F (flush all rules) \\
-* iptables-save > /etc/iptables.rules (saves your custom rules) OR you can edit the file with nano editor /etc/rc.local and paste your rules there. Do "nano /etc/rc.local", paste the rules and Ctrl + X to save and edit.+* iptables-save > /etc/iptables.rules (saves your custom rules) OR you can edit the file with nano editor /etc/rc.local and paste your rules there. Do ''nano /etc/rc.local'', paste the rules and Ctrl + X to save and edit.
  
 ===== Adding Your Firewall Rules ===== ===== Adding Your Firewall Rules =====
  
  
-These rules are copy and paste. Simply paste them at the QORT terminal via SSH and save. \\+These rules are copy and paste. Simply paste them at the Qortal terminal via SSH and save. \\
  
 //**Block outgoing port:**// /sbin/iptables -A OUTPUT -p tcp --dport {PORT-NUMBER-HERE} -j DROP. //For example, you want to block telnet port 21 then put 21 after --dport. It will be /sbin/iptables -A OUTPUT -p tcp --dport 21 -j DROP . Similary, if you wish to block a DNS then it's port 53. Look at common used ports by services on Wikipedia [[https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers]]// \\ //**Block outgoing port:**// /sbin/iptables -A OUTPUT -p tcp --dport {PORT-NUMBER-HERE} -j DROP. //For example, you want to block telnet port 21 then put 21 after --dport. It will be /sbin/iptables -A OUTPUT -p tcp --dport 21 -j DROP . Similary, if you wish to block a DNS then it's port 53. Look at common used ports by services on Wikipedia [[https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers]]// \\
hardware_-_firewall_rules.1599730780.txt.gz · Last modified: 09/10/2020 05:39 by gfactor