A
A
Albert Krozhezhepitskay2018-07-27 17:50:27
Mikrotik
Albert Krozhezhepitskay, 2018-07-27 17:50:27

Filter rules chains in firewall which is more correct?

Tell me where it is more correct to set the rules, as in example 1

Цепочка input
add action=accept chain=input connection-state=established
add action=accept chain=input connection-state=related
add action=drop chain=input connection-state=invalid
add action=accept chain=input dst-port=1701 protocol=udp
add action=drop chain=input 

Цепочка forward
add action=accept chain=forward connection-state=established
add action=accept chain=forward connection-state=related
add action=drop chain=forward connection-state=invalid
add action=accept chain=forward dst-address=192.168.1.10 dst-port=21 protocol=tcp
add action=drop chain=forward

or like this (example 2)
Цепочка input
add action=accept chain=input dst-port=1701 protocol=udp
add action=accept chain=input connection-state=established
add action=accept chain=input connection-state=related
add action=drop chain=input connection-state=invalid
add action=drop chain=input 

Цепочка forward
add action=accept chain=forward dst-address=192.168.1.10 dst-port=21 protocol=tcp
add action=accept chain=forward connection-state=established
add action=accept chain=forward connection-state=related
add action=drop chain=forward connection-state=invalid
add action=drop chain=forward

I noticed that if established and related are higher, then packets stop flying in the rules below

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Shitskov, 2018-07-27
@deni

1. Drop inavild
2. Established, Related
3. Other rules Accept
4*. Drop all

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question