Загрузка страницы

Using `iptables` on Linux

In this video, I show you how to use iptables to firewall inbound traffic on your Linux server or home computer.

Here's some useful commands:

# enable all traffic on localhost
iptables -A INPUT -i lo -j ACCEPT
iptables -A OUTPUT -o lo -j ACCEPT
# list all rules
iptables -L -n
# accept traffic on HTTP and HTTPS
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -p tcp --dport 443 -j ACCEPT
# set the policy to DROP
iptables -P INPUT DROP

# an extra one not shown in the video: this will allow all outgoing traffic for already established TCP connections. This is important if you limit inbound traffic as well as outgoing traffic.
iptables -A OUTPUT -p tcp --dport 513:65535 --state ESTABLISHED -j ACCEPT

# delete the fifth input rule
iptables -D INPUT 5

Видео Using `iptables` on Linux канала macheads101
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
4 января 2014 г. 0:36:17
00:08:25
Яндекс.Метрика