Hot to allow access some ip ,but drop other ip ?

[admin@MikroTik] > ip firewall filter pr
Flags: X - disabled, I - invalid, D - dynamic
0 chain=forward action=accept dst-address=222.222.222.222

1 chain=forward action=drop

Hope allow access 222.222.222.222,drop other ip!!

But all packet drop !!!

How to Setup ok ?

Thank you.

Try adding rules at the top of the list allowing Established and Related connections, else the return traffic will not pass.

Please tell me how to setup ?

Thank you.

Help me !!! Help me!!! :open_mouth:

/ip firewall filter
add chain=forward action=accept connection-state=related place-before=0
add chain=forward action=accept connection-state=established place-before=0



/ip firewall filter
add action=accept chain=forward comment="" connection-state=established disabled=no
add action=accept chain=forward comment="" connection-state=related disabled=no
add action=accept chain=forward comment="" disabled=no dst-address=222.222.222.222
add action=drop chain=forward comment="" disabled=no

Note that this will only allow access to 222.222.222.222, not from.

It will only allow a connection to be initiated to 222.222.222.222 not initiated from. Once the connection is initiated, packets FROM 222.222.222.222 will be allowed back to the originator. That’s why I originally said, “return packets will not pass”.

Sorry, I thought that’s what I said.