Port forward problem

Hi!

i’m not able to forward port 433 from wan to 192.168.1.90

please advice (any other advice is also greatly appreciated)

thank you in advance


# apr/16/2020 20:01:30 by RouterOS 6.47beta49
# software id = R192-XR03
#
# model = RouterBOARD 962UiGS-5HacT2HnT
# serial number = 67370579848F
/interface bridge
add admin-mac=5C:6A:80:4F:17:58 auto-mac=no fast-forward=no name=IPTV-Bridge
add admin-mac=E4:8D:8C:49:2B:64 auto-mac=no comment=defconf igmp-snooping=yes \
    name=bridge
/interface ethernet
set [ find default-name=ether1 ] advertise=10M-full,100M-full,1000M-full \
    rx-flow-control=auto tx-flow-control=auto
set [ find default-name=ether2 ] advertise=10M-full,100M-full,1000M-full \
    comment=Stua rx-flow-control=auto tx-flow-control=auto
set [ find default-name=ether3 ] advertise=10M-full,100M-full,1000M-full \
    comment=Loftet rx-flow-control=auto tx-flow-control=auto
set [ find default-name=ether4 ] advertise=10M-full,100M-full,1000M-full
set [ find default-name=ether5 ] advertise=10M-full,100M-full,1000M-full \
    comment=Freenas rx-flow-control=auto tx-flow-control=auto
set [ find default-name=sfp1 ] advertise=10M-full,100M-full,1000M-full \
    mac-address=5C:6A:80:4F:17:58
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=20/40mhz-XX \
    disabled=no distance=indoors frequency=auto installation=indoor mode=\
    ap-bridge ssid=taugata24 wireless-protocol=802.11
set [ find default-name=wlan2 ] band=5ghz-a/n/ac channel-width=\
    20/40/80mhz-XXXX disabled=no distance=indoors frequency=auto \
    installation=indoor mode=ap-bridge ssid=taugata24_5g wireless-protocol=\
    802.11
/interface vlan
add comment=Phone interface=sfp1 name=vlan100 vlan-id=100
add comment=IPTV interface=sfp1 name=vlan101 vlan-id=101
add comment=Internet interface=sfp1 name=vlan102 vlan-id=102
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa-psk,wpa2-psk mode=\
    dynamic-keys supplicant-identity=MikroTik
/ip hotspot profile
set [ find default=yes ] html-directory=flash/hotspot
/ip pool
add name=dhcp ranges=192.168.1.100-192.168.1.254
/ip dhcp-server
add address-pool=dhcp disabled=no interface=bridge name=dhcp1
/interface bridge port
add bridge=bridge comment=defconf interface=ether2
add bridge=bridge comment=defconf interface=ether3
add bridge=bridge comment=defconf interface=ether4
add bridge=bridge comment=defconf interface=ether5
add bridge=bridge comment=defconf disabled=yes interface=sfp1
add bridge=bridge comment=defconf interface=wlan1
add bridge=bridge comment=defconf interface=wlan2
add bridge=bridge interface=ether1
add bridge=IPTV-Bridge interface=vlan101
/interface bridge settings
set use-ip-firewall=yes
/ip neighbor discovery-settings
set discover-interface-list=LAN
/ip settings
set accept-source-route=yes
/interface list member
add comment=defconf interface=bridge list=LAN
add interface=vlan102 list=WAN
/ip address
add address=192.168.1.1/24 comment=defconf interface=ether1 network=\
    192.168.1.0
/ip dhcp-client
add comment=Internett disabled=no interface=vlan102
add add-default-route=no comment=IPTV dhcp-options=clientid,hostname \
    disabled=no interface=IPTV-Bridge
add disabled=no interface=sfp1
/ip dhcp-server network
add address=192.168.1.0/24 comment=defconf gateway=192.168.1.1 netmask=24
/ip dns
set allow-remote-requests=yes
/ip dns static
add address=192.168.1.1 comment=defconf name=router.lan
/ip firewall address-list
add address=192.168.1.0/24 list=support
/ip firewall filter
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" \
    connection-state=established,related
add action=accept chain=forward connection-nat-state=dstnat connection-state=\
    established,related in-interface=vlan102 protocol=tcp
add action=accept chain=input connection-state=established,related
add action=accept chain=input connection-state=new
add action=accept chain=input protocol=udp
add action=accept chain=input protocol=igmp
add action=accept chain=forward protocol=udp
add action=accept chain=input comment="defconf: accept ICMP" disabled=yes \
    protocol=icmp
add action=accept chain=input comment=\
    "defconf: accept established,related,untracked" connection-state=\
    established,related,untracked disabled=yes
add action=accept chain=forward comment=\
    "defconf: accept established,related, untracked" connection-state=\
    established,related,untracked disabled=yes
add action=drop chain=input disabled=yes dst-port=53 in-interface=vlan102 \
    protocol=udp
add action=accept chain=forward comment="defconf: accept in ipsec policy" \
    disabled=yes ipsec-policy=in,ipsec
add action=drop chain=input comment="defconf: drop invalid" connection-state=\
    invalid disabled=yes
add action=accept chain=input comment=\
    "defconf: accept to local loopback (for CAPsMAN)" disabled=yes \
    dst-address=127.0.0.1
add action=drop chain=input comment="defconf: drop all not coming from LAN" \
    disabled=yes in-interface-list=!LAN
add action=accept chain=forward comment="defconf: accept out ipsec policy" \
    disabled=yes ipsec-policy=out,ipsec
add action=drop chain=forward comment="defconf: drop invalid" \
    connection-state=invalid disabled=yes
add action=drop chain=forward comment=\
    "defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat \
    connection-state=new disabled=yes in-interface=vlan102
/ip firewall mangle
add action=mark-routing chain=prerouting dst-address=172.21.0.0/16 \
    new-routing-mark=IPTV-Mark passthrough=yes src-address=0.0.0.0/0
/ip firewall nat
add action=masquerade chain=srcnat out-interface=vlan102 to-addresses=0.0.0.0
add action=masquerade chain=srcnat out-interface=IPTV-Bridge
add action=dst-nat chain=dstnat dst-port=443 in-interface=vlan102 protocol=\
    tcp to-addresses=192.168.1.90 to-ports=443
/ip route
add disabled=yes distance=1 gateway=10.164.44.1 routing-mark=IPTV-Mark
/ip route rule
add routing-mark=IPTV-Mark table=IPTV-Mark
/ip upnp
set enabled=yes
/ip upnp interfaces
add interface=bridge type=internal
add interface=vlan102 type=external
add interface=sfp1 type=external
/ipv6 firewall address-list
add address=::/128 comment="defconf: unspecified address" list=bad_ipv6
add address=::1/128 comment="defconf: lo" list=bad_ipv6
add address=fec0::/10 comment="defconf: site-local" list=bad_ipv6
add address=::ffff:0.0.0.0/96 comment="defconf: ipv4-mapped" list=bad_ipv6
add address=::/96 comment="defconf: ipv4 compat" list=bad_ipv6
add address=100::/64 comment="defconf: discard only " list=bad_ipv6
add address=2001:db8::/32 comment="defconf: documentation" list=bad_ipv6
add address=2001:10::/28 comment="defconf: ORCHID" list=bad_ipv6
add address=3ffe::/16 comment="defconf: 6bone" list=bad_ipv6
add address=::224.0.0.0/100 comment="defconf: other" list=bad_ipv6
add address=::127.0.0.0/104 comment="defconf: other" list=bad_ipv6
add address=::/104 comment="defconf: other" list=bad_ipv6
add address=::255.0.0.0/104 comment="defconf: other" list=bad_ipv6
/ipv6 firewall filter
add action=accept chain=input comment=\
    "defconf: accept established,related,untracked" connection-state=\
    established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=\
    invalid
add action=accept chain=input comment="defconf: accept ICMPv6" protocol=\
    icmpv6
add action=accept chain=input comment="defconf: accept UDP traceroute" port=\
    33434-33534 protocol=udp
add action=accept chain=input comment=\
    "defconf: accept DHCPv6-Client prefix delegation." dst-port=546 protocol=\
    udp src-address=fe80::/10
add action=accept chain=input comment="defconf: accept IKE" dst-port=500,4500 \
    protocol=udp
add action=accept chain=input comment="defconf: accept ipsec AH" protocol=\
    ipsec-ah
add action=accept chain=input comment="defconf: accept ipsec ESP" protocol=\
    ipsec-esp
add action=accept chain=input comment=\
    "defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
add action=drop chain=input comment=\
    "defconf: drop everything else not coming from LAN" in-interface-list=\
    !LAN
add action=accept chain=forward comment=\
    "defconf: accept established,related,untracked" connection-state=\
    established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" \
    connection-state=invalid
add action=drop chain=forward comment=\
    "defconf: drop packets with bad src ipv6" src-address-list=bad_ipv6
add action=drop chain=forward comment=\
    "defconf: drop packets with bad dst ipv6" dst-address-list=bad_ipv6
add action=drop chain=forward comment="defconf: rfc4890 drop hop-limit=1" \
    hop-limit=equal:1 protocol=icmpv6
add action=accept chain=forward comment="defconf: accept ICMPv6" protocol=\
    icmpv6
add action=accept chain=forward comment="defconf: accept HIP" protocol=139
add action=accept chain=forward comment="defconf: accept IKE" dst-port=\
    500,4500 protocol=udp
add action=accept chain=forward comment="defconf: accept ipsec AH" protocol=\
    ipsec-ah
add action=accept chain=forward comment="defconf: accept ipsec ESP" protocol=\
    ipsec-esp
add action=accept chain=forward comment=\
    "defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
add action=drop chain=forward comment=\
    "defconf: drop everything else not coming from LAN" in-interface-list=\
    !LAN
/routing igmp-proxy
set quick-leave=yes
/routing igmp-proxy interface
add alternative-subnets=0.0.0.0/0 interface=IPTV-Bridge upstream=yes
add interface=bridge
/system clock
set time-zone-name=Europe/Oslo
/tool graphing interface
add interface=vlan102
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN

Hello,

I saw that you wrote port 433 in the forum but the code is for port 443, I will asume that you want to nat the https port to this IP address.
The code seems to be all right
I never have used the “to_addresses” with 0.0.0.0 in the masquerade rule, I dont know if this works.

/ip firewall nat
add action=masquerade chain=srcnat out-interface=vlan102 to-addresses=0.0.0.0

Did you check that the 192.168.1.90 address is accessible from the router and this is listening on port 443?
If this is a Windows machine, you can type the following in command line to check

netstat -noa | findstr "443"

Otherwise you can check in other PC with Windows if this device is listening on port 443 with the following command:

telnet 192.168.1.90 443

Or just open a browser and write the ip address on it
If you cannot connect from another computer, then the issue is not the Mikrotik.
If you can connect from inside, maybe the problem is that 0.0.0.0, not sure what does it do.

Regards,
Damián