Changes between Version 12 and Version 13 of Csle2022/Agenda/FW


Ignore:
Timestamp:
Oct 20, 2022, 2:22:31 PM (2 years ago)
Author:
geethike
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Csle2022/Agenda/FW

    v12 v13  
    147147sudo iptables -A INPUT -s 192.168.1.3 -p tcp --dport 22 -j ACCEPT
    148148}}}
     149
     150'''3. Deleting a rule from the iptable :'''
     151
     152'''Syntax:-'''
     153{{{
     154sudo iptables -D chain_name rule_number
     155}}}
     156'''Example:-'''[[BR]]
     157If we want to delete the rule which accepts the traffic to port 22 and which we have added in the previous section, then:-
     158{{{
     159sudo iptables -D INPUT 1
     160}}}
     161Remember the rules number starts from 1
     162
     163'''4. Saving your configuration :'''
     164This part is unnecessary if you are implementing it on a personal computer which is not a server, but if
     165you are implementing a firewall on a server, then there are high chances that your server might get corrupted and
     166you might lose all your data. So, it’s always better to save your configurations.
     167
     168There are a lot of ways to do this, but the easiest way I find is with '''iptables-persistent''' package. You can download the package from Ubuntu’s default repositories:
     169{{{
     170sudo apt-get update
     171sudo apt-get install iptables-persistent
     172}}}
     173Once the installation is complete, you can save your configuration using the command:-
     174{{{
     175sudo invoke-rc.d iptables-persistent save
     176}}}