Community discussions

MikroTik App
 
User avatar
camg
newbie
Topic Author
Posts: 29
Joined: Sun Aug 29, 2021 2:37 pm

ip firewall nat problem

Sun Oct 30, 2022 4:24 pm

Hello, when I set the port mapping according to the official manual, it has no effect. How to troubleshoot the problem? The following is the configuration content。

[admin@MikroTik] /ip firewall nat> print
Flags: X - disabled, I - invalid, D - dynamic
0 ;;; NAT
chain=srcnat action=masquerade out-interface=pppoe-out1 log=no
log-prefix=""

1 ;;; NAT
chain=srcnat action=masquerade out-interface=pppoe-out2 log=no
log-prefix=""

2 ;;; 3389
chain=dstnat action=dst-nat to-addresses=192.168.88.226 to-ports=3389
protocol=tcp in-interface=pppoe-out1 port=3389 log=no log-prefix=""
The default configuration, the two wan ports have not yet set PCC
 
User avatar
camg
newbie
Topic Author
Posts: 29
Joined: Sun Aug 29, 2021 2:37 pm

Re: ip firewall nat problem

Sun Oct 30, 2022 4:26 pm

Firewall has no other rules set
 
User avatar
camg
newbie
Topic Author
Posts: 29
Joined: Sun Aug 29, 2021 2:37 pm

Re: ip firewall nat problem

Sun Oct 30, 2022 5:02 pm

The client firewall is also down
 
erlinden
Forum Guru
Forum Guru
Posts: 1957
Joined: Wed Jun 12, 2013 1:59 pm
Location: Netherlands

Re: ip firewall nat problem

Sun Oct 30, 2022 5:14 pm

For port forwarding you have to use the dstnat chain (and not the srcnat chain).

Update: oops...you did that already. Can you share your complete firewall:
/ip firewall export
 
User avatar
camg
newbie
Topic Author
Posts: 29
Joined: Sun Aug 29, 2021 2:37 pm

Re: ip firewall nat problem

Sun Oct 30, 2022 5:27 pm

[admin@MikroTik] /ip firewall> export
# oct/30/2022 15:26:56 by RouterOS 6.47.9
# software id = TI09-7WK3
#
#
#
/ip firewall nat
add action=masquerade chain=srcnat comment="\C1\AA\CD\A8NAT\B3\F6\BF\DA" \
out-interface=pppoe-out1
add action=masquerade chain=srcnat comment="\B5\E7\D0\C5NAT\B3\F6\BF\DA" \
out-interface=pppoe-out2
add action=dst-nat chain=dstnat comment="3389\B6\CB\BF\DA\D3\B3\C9\E4" \
in-interface=pppoe-out1 port=3389 protocol=tcp to-addresses=192.168.88.226 \
to-ports=0
 
User avatar
camg
newbie
Topic Author
Posts: 29
Joined: Sun Aug 29, 2021 2:37 pm

Re: ip firewall nat problem

Sun Oct 30, 2022 5:28 pm

This is all the rules of the firewall, please read it, please. Thank you
 
erlinden
Forum Guru
Forum Guru
Posts: 1957
Joined: Wed Jun 12, 2013 1:59 pm
Location: Netherlands

Re: ip firewall nat problem

Sun Oct 30, 2022 5:35 pm

Where are the default firewall rules? If this router is connected to the Internet and has a public IP address...you might be in bigger problems than a non-working port forward.

May I advise you to netinstall this device and keep the default firewall rules. From there, you can start with adding additional rules (like adding the pppoe interfaces to the WAN addresslist.
 
User avatar
camg
newbie
Topic Author
Posts: 29
Joined: Sun Aug 29, 2021 2:37 pm

Re: ip firewall nat problem

Sun Oct 30, 2022 5:41 pm

[admin@MikroTik] /ip firewall> filter print
Flags: X - disabled, I - invalid, D - dynamic
[admin@MikroTik] /ip firewall>

Hello, at present this router has two public ip addresses, the current configuration is only two PPPOE, the current configuration is only DHCP, NAT, DNS, other configurations have not been added, they are all factory defaults, is it a bug?
 
erlinden
Forum Guru
Forum Guru
Posts: 1957
Joined: Wed Jun 12, 2013 1:59 pm
Location: Netherlands

Re: ip firewall nat problem

Sun Oct 30, 2022 5:56 pm

At least the default configuration is not complete. You might want to consider adding the default firewall rules (but it might cause a non working router).
Perhaps better to share the complete config befor making any changes:

/export hide-sensitive file=anynameyoulike (remove any private information and place it in between code tags).

What device is it?
What RouterOS version is it running?
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19322
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: ip firewall nat problem

Sun Oct 30, 2022 6:03 pm

 
User avatar
camg
newbie
Topic Author
Posts: 29
Joined: Sun Aug 29, 2021 2:37 pm

Re: ip firewall nat problem

Mon Oct 31, 2022 5:12 am

Ok thanks, I'm trying to reinstall a new version.

Who is online

Users browsing this forum: No registered users and 22 guests