Changes between Version 2 and Version 3 of Iptables


Ignore:
Timestamp:
02/01/22 23:05:53 (3 years ago)
Author:
krit
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Iptables

    v2 v3  
    2525iptables -D OUTPUT -d 203.151.31.76 -j DROP
    2626}}}
     27
     28To block specific port number such tcp port # 5050, enter:
     29{{{
     30#!sh
     31iptables -A OUTPUT -p tcp --dport 5050 -j DROP
     32}}}
     33To block tcp port # 5050 for an IP address 192.168.1.2 only, enter:
     34{{{
     35#!sh
     36iptables -A OUTPUT -p tcp -d 192.168.1.2 --dport 5050 -j DROP
     37}}}
     38For unblock just change -A to -D on the above command