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


Ignore:
Timestamp:
Oct 20, 2022, 11:41:05 AM (3 years ago)
Author:
geethike
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Csle2022/Agenda/FW

    v11 v12  
    124124sudo iptables -L
    125125}}}
     126
     127The Output would be:-
     128image
     129
     130'''2. Implementing a ACCEPT rule :'''
     131If you want to add rules to specific ports of your network,then the following commands can be used.
     132
     133'''Syntax:-'''
     134{{{
     135sudo iptables -A/-I chain_name -s source_ip -p protocol_name --dport port_number -j Action_to_take
     136}}}
     137
     138'''-p protocol_name:-'''
     139This option is used to match the packets that follow the protocol protocol_name.
     140
     141'''-dport port_number:'''
     142This is option is available only if you give the -p protocol_name option. It specifies to look for the packets that are going to the port “port_number”.
     143
     144'''Example:-'''[[BR]]
     145Let’s say we want to keep our SSH port open (we will assume in this guide that the default SSH port is 22) from the 192.168.1.3 network we blocked in the above case. That is we only want to allow those packets coming from 192.168.1.3 and which wants to go to the port 22.
     146{{{
     147sudo iptables -A INPUT -s 192.168.1.3 -p tcp --dport 22 -j ACCEPT
     148}}}