Community discussions

MikroTik App
 
barara
just joined
Topic Author
Posts: 11
Joined: Tue Jan 12, 2016 9:41 am

Routeros 7 Block a specific port number.

Thu Sep 08, 2022 6:30 pm

As shown in the figure below, I want to block port 2351 from outside to WAN ip(port) and allow port 2351 from LAN to WAN ip.
Is there any way?
Thank you.
port2351.png
You do not have the required permissions to view the files attached to this post.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19125
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Routeros 7 Block a specific port number.

Thu Sep 08, 2022 6:39 pm

Default rules block all WAN traffic,
Default rules allow LAN to WAN traffic,

Post your COMPLETE config /export
just hide your serial number and any public WANIP info.
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11452
Joined: Thu Mar 03, 2016 10:23 pm

Re: Routeros 7 Block a specific port number.

Thu Sep 08, 2022 6:45 pm

In addition to what @anav wrote about default firewall rules: you'll need hairpin NAT ... use google to search info about how to implement it on Mikrotik gear.
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 3292
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

Re: Routeros 7 Block a specific port number.

Thu Sep 08, 2022 6:53 pm

you'll need hairpin NAT
This depends on where the 122.122.x.x IP are. If this is just to reach the Routers IP, then just use internal gateway to reach the Router.
If its you like the inside clients to reach an internal Server that you are using NAT to point to, you can use Hairpin like MKX mention, or use internal DNS to point to internal IP. But without showing the config, it will be only guessing.
 
barara
just joined
Topic Author
Posts: 11
Joined: Tue Jan 12, 2016 9:41 am

Re: Routeros 7 Block a specific port number.

Thu Sep 08, 2022 7:14 pm

Thanks for reply.
It seems that the routing table on the client pc was the problem.
After adjusting the routing table, the problem was resolved.
Thank you.

Who is online

Users browsing this forum: No registered users and 32 guests