Kamis, 03 Oktober 2019

Iptables Command Example Linux

  Tidak ada komentar
Show ip tables with line number
[email protected] ~$ sudo iptables -L -n --line-numbers
[sudo] password for myuser:
Chain INPUT (policy DROP)
num  target     prot opt source               destination
1    ACCEPT     all  --  172.16.222.125       192.168.74.10        /* pritunl_dev */
2    DROP       all  --  172.16.222.125       0.0.0.0/0            /* pritunl_dev */
3    ACCEPT     all  --  0.0.0.0/0            192.168.75.10        /* pritunl_5d91e9754556d1020e10fd0e */
4    ACCEPT     all  --  0.0.0.0/0            192.168.220.0/24     /* pritunl_5d91e9754556d1020e10fd0e */
..
..
Ip Tables insert firewall rule on specific line, this command with insert rule on forward segment line 3 
[email protected] ~$ sudo iptables -I FORWARD 3 -s 172.16.212.124 -m comment --comment pritunl_dev -j DROP



Tidak ada komentar :

Posting Komentar