Пример. Разрешен доступ к определённым хостам в Интернет MikroTik-Simple

Ключ
Эта строка удалена.
Это слово было удалено. Это слово было добавлено.
Эта строка добавлена.

Изменения (4)

просмотр истории страницы
/ip firewall filter add chain=crb_forward comment=trust_custom_accept_dst dst-address-list=crb_trust_custom_list src-address-list=crb_custom_auth_list action=accept
/ip firewall filter add chain=crb_forward comment=trust_custom_accept_src src-address-list=crb_trust_custom_list dst-address-list=crb_custom_auth_list action=accept
/ip firewall filter add chain=crb_forward comment=trust_custom_drop_dst dst-address-list=!crb_trust_custom_list src-address-list=crb_custom_auth_list action=drop
/ip firewall filter add chain=crb_forward comment=trust_custom_drop_src src-address-list=!crb_trust_custom_list dst-address-list=crb_custom_auth_list action=drop
{code}

/ip firewall filter move numbers=[find comment=trust_custom_accept_src] destination=[[find comment=drop_no_auth] -1 ]
/ip firewall filter move numbers=[find comment=trust_custom_accept_dst] destination=[[find comment=drop_no_auth] -2 ]
/ip firewall filter move numbers=[find comment=trust_custom_drop_dst] destination=[[find comment=drop_no_auth] -3 ]
/ip firewall filter move numbers=[find comment=trust_custom_drop_src] destination=[[find comment=drop_no_auth] -4 ]
{code}


user_add(){
if [ "$auth_type" == "1" ] && ! [ "$tarif_id" == "1136" ]; then
while send_mikrotik_cmd -s "$nas_ip" "$telnet_login" "$telnet_password" /ip firewall address-list remove numbers=${ip}_crb_auth; do :; done
send_mikrotik_cmd "$nas_ip" "${telnet_login}" "${telnet_password}" /ip firewall address-list add list=crb_auth_list address=$ip comment=${ip}_crb_auth
fi
if [ "$auth_type" == "1" ] && [ "$tarif_id" == "1136" ]; then
while send_mikrotik_cmd -s "$nas_ip" "$telnet_login" "$telnet_password" /ip firewall address-list remove numbers=${ip}_crb_custom_auth; do :; done
send_mikrotik_cmd "$nas_ip" "${telnet_login}" "${telnet_password}" /ip firewall address-list add list=crb_custom_auth_list address=$ip comment=${ip}_crb_custom_auth