WebFig access issues with VPN through LTE

Hy everyone, please assist me with this one, I know it must be something simple, but I have no idea what…

WebFix is not opening from 10.0.0.0/23 neither with NAT (10.0.1.207:8080) or straight through IP (10.0.1.207) assigned with VPN.

NAT rule works fine if I point it to machine (192.168.88.254) on the LAN but not if it’s to router’s IP(192.168.88.1).

sep/02/2024 17:20:44 by RouterOS 6.44.5

software id = BEC0-WG9B

model = RB952Ui-5ac2nD

serial number = BEB80BEE706A

/interface lte
set [ find ] mac-address=0C:5B:8F:27:9A:64 name=lte1
/interface bridge
add admin-mac=C4:AD:34:7E:2A:8F auto-mac=no comment=defconf name=bridge
/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=MikroTik-7E2A94 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=MikroTik-7E2A93 wireless-protocol=
802.11
/interface pptp-client
add connect-to=* disabled=no keepalive-timeout=disabled name=pptp-out password="" user=""
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip hotspot profile
set [ find default=yes ] html-directory=flash/hotspot
/ip pool
add name=default-dhcp ranges=192.168.88.10-192.168.88.254
/ip dhcp-server
add address-pool=default-dhcp disabled=no interface=bridge name=defconf
/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 interface=wlan1
add bridge=bridge comment=defconf interface=wlan2
add bridge=bridge comment=defconf interface=LAN
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ether1 list=WAN
/ip address
add address=192.168.88.1/24 comment=defconf interface=bridge network=192.168.88.0
/ip dhcp-client
add comment=defconf dhcp-options=hostname,clientid disabled=no interface=ether1
/ip dhcp-server network
add address=192.168.88.0/24 comment=defconf dns-server=8.8.8.8 gateway=192.168.88.1
/ip dns
set allow-remote-requests=yes
/ip dns static
add address=192.168.88.1 name=router.lan
/ip firewall filter
add action=accept chain=input connection-state=established,related,new,untracked dst-port=80,443,8291 protocol=tcp src-address=10.0.0.0/23
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 ICMP" protocol=icmp
add action=drop chain=input comment="defconf: drop all not coming from LAN" in-interface-list=!LAN
add action=accept chain=forward comment="defconf: accept in ipsec policy" ipsec-policy=in,ipsec
add action=accept chain=forward comment="defconf: accept out ipsec policy" ipsec-policy=out,ipsec
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" connection-state=established,related
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 all from WAN not DSTNATed" connection-nat-state=!dstnat connection-state=new in-interface-list=WAN
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" ipsec-policy=out,none out-interface=lte1
add action=dst-nat chain=dstnat dst-port=81 in-interface=pptp-out protocol=tcp to-addresses=192.168.88.150 to-ports=80
add action=dst-nat chain=dstnat dst-port=82 in-interface=pptp-out protocol=tcp to-addresses=192.168.88.151 to-ports=80
add action=dst-nat chain=dstnat dst-port=83 in-interface=pptp-out protocol=tcp to-addresses=192.168.88.152 to-ports=80
add action=dst-nat chain=dstnat dst-port=84 in-interface=pptp-out protocol=tcp to-addresses=192.168.88.153 to-ports=80
add action=dst-nat chain=dstnat dst-port=80 in-interface=pptp-out protocol=tcp to-addresses=192.168.88.1 to-ports=80
add action=dst-nat chain=dstnat dst-port=8080 in-interface=pptp-out protocol=tcp to-addresses=192.168.88.1 to-ports=80
/ip route
add distance=1 dst-address=10.0.0.0/23 gateway=pptp-out
/ip route rule
add
/ip service
set www address=192.168.88.0/24,10.0.0.0/23
/system clock
set time-zone-name=Europe/Dublin
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN


Many thanks in advance!!!

For the love of God and your router, please do not use PPTP! It is obsolete, deprecated and insecure! At least use L2TP over IPsec. And please update your router to either 6.49.17 or 7.x

Found it on one of the shelfs covered with dust and decided to give it a use, sorry, now updated to latest available. Unfortunately, have to use pptp for this moment :frowning:
Reconfigured from the scratch and have 10th network reachable, NAT worked fine for 192.168.88.254 machine but WebFig still refuses to open on 192.168.88.1.

sep/03/2024 10:28:11 by RouterOS 6.49.17

software id = BEC0-WG9B

model = RB952Ui-5ac2nD

serial number = BEB80BEE706A

/interface lte
set [ find ] name=lte1
/interface bridge
add admin-mac=C4:AD:34:7E:2A:8F auto-mac=no comment=defconf name=bridge
/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=MikroTik-7E2A94 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=MikroTik-7E2A93 wireless-protocol=802.11
/interface pptp-client
add connect-to=* disabled=no keepalive-timeout=disabled name=
pptp-out password="" user=""
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=default-dhcp ranges=192.168.88.10-192.168.88.254
/ip dhcp-server
add address-pool=default-dhcp disabled=no interface=bridge name=defconf
/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 interface=wlan1
add bridge=bridge comment=defconf interface=wlan2
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ether1 list=WAN
add interface=lte1 list=WAN
/ip address
add address=192.168.88.1/24 comment=defconf interface=bridge network=
192.168.88.0
/ip dhcp-client
add comment=defconf disabled=no interface=ether1
/ip dhcp-server network
add address=192.168.88.0/24 comment=defconf dns-server=192.168.88.1 gateway=
192.168.88.1
/ip dns
set allow-remote-requests=yes servers=10.0.1.1
/ip dns static
add address=192.168.88.1 comment=defconf name=router.lan
/ip 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 ICMP" protocol=icmp
add action=accept chain=input comment=
"defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
add action=drop chain=input comment="defconf: drop all not coming from LAN"
in-interface-list=!LAN
add action=accept chain=forward comment="defconf: accept in ipsec policy"
ipsec-policy=in,ipsec
add action=accept chain=forward comment="defconf: accept out ipsec policy"
ipsec-policy=out,ipsec
add action=fasttrack-connection chain=forward comment="defconf: fasttrack"
connection-state=established,related
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 all from WAN not DSTNATed"
connection-nat-state=!dstnat connection-state=new in-interface-list=WAN
add action=accept chain=forward dst-address=10.0.0.0/23 src-address=
192.168.88.0/24
add action=accept chain=forward dst-address=192.168.88.0/24 src-address=
10.0.0.0/23
add action=accept chain=input dst-port=80,443 protocol=tcp src-address=
10.0.0.0/23
add action=accept chain=forward dst-address=10.0.0.0/23 src-address=
192.168.88.0/24
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" ipsec-policy=
out,none out-interface-list=WAN
add action=dst-nat chain=dstnat dst-port=8080 protocol=tcp to-addresses=
192.168.88.1 to-ports=80
add action=masquerade chain=srcnat dst-address=10.0.0.0/23 out-interface=
pptp-out src-address=192.168.88.0/24
/ip route
add distance=1 dst-address=10.0.0.0/23 gateway=pptp-out
/ip service
set www address=0.0.0.0/0
set www-ssl address=0.0.0.0/0 disabled=no
/system clock
set time-zone-name=Europe/Dublin
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN

You have the “accept” rule for your PPTP:

add action=accept chain=input dst-port=80,443 protocol=tcp src-address=10.0.0.0/23

after your general “drop rule”:

add action=drop chain=input comment="defconf: drop all not coming from LAN"

You need to change the sequence to make it work, or add the PPTP interface to the “LAN” interface list.

Hi xrlls, many thanks for response!

Have moved my accept rules to the very top and added pptp to LAN list, unfortunately with no joy…

/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ether1 list=WAN
add interface=lte1 list=WAN
add interface=pptp-out list=LAN

/ip firewall filter
add action=accept chain=input comment=
“defconf: accept established,related,untracked” connection-state=
established,related,untracked
add action=accept chain=input dst-port=80,443 protocol=tcp src-address=
10.0.0.0/23
add action=accept chain=forward dst-address=10.0.0.0/23 src-address=
192.168.88.0/24
add action=accept chain=forward dst-address=192.168.88.0/24 src-address=
10.0.0.0/23
add action=accept chain=forward dst-address=10.0.0.0/23 src-address=
192.168.88.0/24
add action=drop chain=input comment=“defconf: drop invalid” connection-state=
invalid
add action=accept chain=input comment=“defconf: accept ICMP” protocol=icmp
add action=accept chain=input comment=
“defconf: accept to local loopback (for CAPsMAN)” dst-address=127.0.0.1
add action=drop chain=input comment=“defconf: drop all not coming from LAN”
in-interface-list=!LAN
add action=accept chain=forward comment=“defconf: accept in ipsec policy”
ipsec-policy=in,ipsec
add action=accept chain=forward comment=“defconf: accept out ipsec policy”
ipsec-policy=out,ipsec
add action=fasttrack-connection chain=forward comment=“defconf: fasttrack”
connection-state=established,related
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 all from WAN not DSTNATed”
connection-nat-state=!dstnat connection-state=new in-interface-list=WAN

It is probably some kind of routing error. But it may be dependent on missing configuration on the remote end of your PPTP. Can you ping the router from the host you are trying to connect from?

Ping works fine from machine to router’s IP in 10.0.0.0/23 network. Funny thing is that once I change destination IP in NAT rule to one of machines which is running dummy web-page, it opens without any problems. :open_mouth:

I’m getting dizzy by the NAT’ing :open_mouth:

I suspect it would work without that dstnat. As far as I can see, you are have no dstnat on https, so maybe tray connecting using https on port 443 and see if it works.

I guess I don’t have experience enough in NAT’ing to say for sure what is happening. If it was my own setup I would probably start looking at a packet trace, but there might be someone more skilled in NAT on this forum.

Port 8080 of the dst-nat rule is a reserved port for other use, so change it to a more obsolete one (e.g. 17680)

And you’ve leaked your PPTP username and password, elide them PRONTO and change them afterwards!

Thanks Cat for noticing, elided now, password changed, thanks again.

According to port 8080, as I noticed before the NAT rule worked fine for machine connected to router but didn’t for router itself, so wouldn’t fall on port in this case. Changed it to 17680 but got the same result :frowning:

xrlls, yes you are right, I suspected it as well, and was surprised it didn’t work… It definitely should open webFig with local VPN address of the router but it didn’t, and did when router was hooked to 10th network through eth0 port directly.
I’m using NAT here because this router is going to be used for provisioning access to several local web resources hosted on different machines, so NAT is essential. It still can do it’s job but would like to have an option to manage it remotely, btw WinBox refuses to connect too.

I’m almost ready enough for packet tracer experience :smiley:

Not that I expect it to be the problem, but could you add the following firewall rules somewhere in the beginning:

/ip firewall filter
add action=accept chain=input protocol=tcp dst-port=1723
add action=accept chain=input protocol=47