IPTables
Материал из M-200 WIKI
(Различия между версиями)
Pax (обсуждение | вклад) |
Pax (обсуждение | вклад) |
||
Строка 8: | Строка 8: | ||
-bash-3.2$ cat /ATS/SYSCONFIG/rc.atsuser.local | -bash-3.2$ cat /ATS/SYSCONFIG/rc.atsuser.local | ||
#!/bin/sh | #!/bin/sh | ||
− | |||
− | |||
sudo iptables -A INPUT -s 192.168.5.1 -j DROP | sudo iptables -A INPUT -s 192.168.5.1 -j DROP | ||
+ | |||
-bash-3.2$ | -bash-3.2$ | ||
-bash-3.2$ | -bash-3.2$ |
Текущая версия на 13:26, 10 апреля 2015
Доступ к интерфейсу управлением межсетевыми экранами (iptables) открыт для пользователя atsuser через sudo.
Для автоматической загрузки набора правил необходимо использовать файл /ATS/SYSCONFIG/rc.atsuser.local.
После перезапуска:
-bash-3.2$ cat /ATS/SYSCONFIG/rc.atsuser.local #!/bin/sh sudo iptables -A INPUT -s 192.168.5.1 -j DROP -bash-3.2$ -bash-3.2$ -bash-3.2$ sudo iptables -L -n -v Chain INPUT (policy ACCEPT 483 packets, 33358 bytes) pkts bytes target prot opt in out source destination 9 540 DROP all -- * * 192.168.5.1 0.0.0.0/0 Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 451 packets, 32535 bytes) pkts bytes target prot opt in out source destination -bash-3.2$