Actually I have 3 interfaces configured on my mikrotik.
ether1 - Internet
ether2 - LAN
ether3 - block of public ip addresses, e.g 92.92.92.92/28,
On my virtual machine, i assigned a fixed public IP address and by default all ports are open.
What I’m tried to achieve is that, i wanted to block all ports and allow only specific port number per IP addresses.
But for some reason, we have a feature on a server which connects to 0365 which stops working, we get an error “Connection could not be established with host smtp.office365.com”.
From my server, I telnet on smtp.office365.com 587, it fails.
To solve it, I have to either disable the “drop” rule or leave the to rule with no dst-port number, which means I’m allowing all port numbers to be open.
Am i doing it the right way, or is there any other alternatives ?
I tried to allow only the office365.com using below but in vain.
chain=forward action=accept protocol=tcp dst-address=92.92.92.93 dst-port=22 log=no log-prefix=“”
chain=forward action=accept protocol=tcp dst-address=92.92.92.93 src-address-list=SMTP_0365 in-interface=ether1 log=no log-prefix=“”
chain=forward action=drop dst-address=92.92.92.92/28 in-interface=ether1 log=yes log-prefix=“”
Firewall works as whole, showing just few rules is not very useful. Wild guess, perhaps you didn’t yet discover stateful firewall (connection-state option) and you’re doing this in stateless way (which can’t work like this)?
Sob = guess master.
Rest of us = Dont be rude post your config
k6ccc = correct but always remind newbe that doing this in the input chain has a huge caution/caveat, ensure one has an allow rule at least for admin access, above the block all rule in place, before putting in the block all rule at the end.
Config please. diagrams are also helpful.
/export file=anynameyouwish (minus serial number and any public wanip info)