INT-firewall konfiguration

From Datateknik
Revision as of 10:44, 21 January 2020 by Imra (Talk | contribs)

Jump to: navigation, search

Nedanstående fungerar ej!

Gamla FirewallD

Bara ETT nätverkskort

Kontrollera att du bara har ett (1) nätverkskort med kommandot: ifconfig
(två om du räknar loopback)

Detta är ett scripts som ...

... tar bort allt gammalt, och skapar en ny ACL

 #!/usr/sbin/nft -f
 
 flush ruleset
 
 table inet filter {
   chain input { 
     type filter hook input priority 0;
     policy drop;

     tcp dport ssh accept counter packets 0 bytes 0 comment "Accept incoming SSH on port 22 via both IPv4 and IPv6" 

     counter packets 0 bytes 0
 }
 
   chain forward {
     type filter hook forward priority 0;
     policy drop;
     counter packets 0 bytes 0 comment "This should always be ZERO, because this device should NOT route packets"
 }
 
   chain output {
     type filter hook output priority 0;
     policy accept;
     counter packets 0 bytes 0 comment "Count outgoing packets"
 }

KOLLA HUR DET BLEV

 nft list ruleset
Personal tools
Namespaces

Variants
Actions
Navigation
Tools