Can't see local IPs from VPN

At my company, we just switched from an RB2011 to an RB4011.
The main network is 192.168.124.0/22. Most of the time 126.0/24 IP-s are given with DHCP, for LAN and VPN users as well, but there are a couple devices with fixed IP on 125.0/24 addresses, that are not given dinamically, but fixed, set in the devices.
In case of the previous router, when we connected to VPN, we could ping both 126.0/24 and 125.0/24 IPs, but now, we can’t ping them through VPN.
Running IP scan on the router finds all of them, and pinging from the router works.

I transfered the configuration using export, and then cutting up the exported .rsc for part-by-part, and imported them, into the new Router.
RouterOS version of old router was 6.42, the new is 6.43.10.

Ports 2-10 are in the same bridge, all PPP profiles are set to this bridge as well.

Where should I look? I’m sure it must be a network-IP issue, but not sure where to check it.

Thanks for the help in advance!

It’s the same as other lost packets cases. Packet must first arrive to router (which means that client has correct route), then it must pass through prerouting, forward and postrouting and leave through the correct interface towards destination. Then a response must take the same way back. And you can see all steps with strategically placed logging rules (or some with Tools->Torch). Find out where packet is lost (incoming request or response) and then it should be clear.

It could even be something other than router config, e.g. Windows computers can detect new network (because gateway mac address changed) and switch network profile from private to public and then their firewall may not allow incoming connections.

Hard to tell without more details but I can guess you would be able to access local IP throu VPN if LAN local interface ARP settings will be changed from “enable” to “proxy arp”.

Check that and let us know

Hi,

i have almost the same issue…

My local IP subnet is 10.0.255.0/24. i have setup the L2TP VPN on my MT and within the profile of the L2TP to get a local IP address 10.10.10.1.and remote client 10.10.10.x/24 resp from the l2tp-pool.

i get the correct conection but i am not able to see the local subnet (which i need to see) 10.0.255.0/24. Do I need to do a routing? Something like

ip route add dst-address=10.10.10.0/24 gateway=10.0.255.0/24

Thanks for your help.

korg

If both subnets are on router, you don’t need to do anything with routing there, it happens automatically. But devices in LAN have to know where to find VPN subnet (it’s also automatic if this router is their default gateway). And VPN clients need to know where LAN subnet is.

Hi,

thanks for your answer… but it does not… thats the problem.

i get the correct IP address resp subent… but i can not ping no IP address friom that range…

korg

It can also be that target device doesn’t like ping requests from another subnet.

Since the range from which you assign addresses to L2TP clients does not overlap your LAN subnet, it must be your firewall rules which prevent them from seeing each other. So check the firewall rules first, and if you cannot see anything there on your own, follow the hint in my automatic signature.

And of course @Sob’s suggestion above is also valid.

You can decide in which way to dig by running /tool sniffer quick ip-protocol=icmp while pinging from the VPN client to the LAN device and watching whether the echo requests leave the LAN interface towards the LAN host or not. If they do, the LAN host doesn’t react on them. If they don’t but you can see them coming in from the VPN interface, it’s your firewall rules. And if you can’t see them to even come in, routing or firewall rules on the VPN client are guilty.

SEE EDIT, and REMEDY below - Shortly after posted this I had the issue reoccuring. See below.
It seems that this was a NAT issue, and bad eyeballs. When the router config was installed fresh, the default NAT rule to mask VPN trafic was left in by mistake with source address being 192.168.89.1, which was of course incorrect.

Rewritten source address to 192.168.124.0/22 with masquarade, to properly NAT VPN trafic and this fixed it.
Immediatelly after added this rule, the pings started to arrive back to me and many things started working correctly.

To make sure this was the issue, I did disable it and tested, and when disabled pings did not arrived, but when reenabled, it was working again.
So fixed.

Thanks for all the ideas though.

EDIT: Immediatelly after I verified this, I felt confident enough to upgrade the firware to RouterOS 6.43.16 (latest long-term version).
After the upgrade this doesn’t work again. I’m really frustraited.
Pinging via VPN is not working. Pinging from router from Winbox also doesn’t work, only if I check the ARP Ping box. Then the ping goes through.
Brige is set to “proxy-arp”.
REMEDY:
I tried and tested many things, with no success, until I hopped onto the Quick Set tab (I usually avoid this menu).
I noticed, that somehow, here the IP of the Router (Local Network - IP) is set to 192.168.124.0, which should not be. I set this on first config to 192.168.126.1, and should remain the same.
Changing 192.168.124.0 on the Quick Set screen to …126.1 immediatelly solved this issue!
I rebooted the router to see if rebooting changes something here, but luckily not, so I think the RouterOS upgrade change the setting here, which it SHOULD NOT :open_mouth:
If you want I can try and reproduce the issue, with screenshots.

Those tools were pretty helpful. The issue was not too obvious. See my longer post above.
In short, after fixing it with the correct NAT rule, I upgraded the RouterOS, and found out that after the update the Router's own IP is changed, from 192.168.126.1 to 192.168.124.0.
Changing it back to 126.1 resolved my issue.

Currently good config:

may/20/2019 23:11:57 by RouterOS 6.43.16

software id = SG29-K0FQ

model = RB4011iGS+5HacQ2HnD

serial number = 96890A574B5E

/interface bridge
add admin-mac=74:4D:28:4A:DB:2A arp=proxy-arp auto-mac=no comment=defconf
name=bridge
/interface wireless
set [ find default-name=wlan2 ] band=2ghz-b/g/n channel-width=20/40mhz-eC
disabled=no distance=indoors frequency=auto mode=ap-bridge name=
name02 ssid=name02 wireless-protocol=802.11
/interface ethernet
set [ find default-name=ether2 ] arp=proxy-arp
set [ find default-name=ether3 ] arp=proxy-arp
set [ find default-name=ether4 ] arp=proxy-arp
set [ find default-name=ether5 ] arp=proxy-arp
set [ find default-name=ether6 ] arp=proxy-arp
set [ find default-name=ether7 ] arp=proxy-arp
set [ find default-name=ether8 ] arp=proxy-arp
set [ find default-name=ether9 ] arp=proxy-arp
set [ find default-name=ether10 ] arp=proxy-arp
/interface pptp-server
add name=pptp-in1 user=""
/interface ethernet switch port
set 0 default-vlan-id=0
set 1 default-vlan-id=0
set 2 default-vlan-id=0
set 3 default-vlan-id=0
set 4 default-vlan-id=0
set 5 default-vlan-id=0
set 6 default-vlan-id=0
set 7 default-vlan-id=0
set 8 default-vlan-id=0
set 9 default-vlan-id=0
set 10 default-vlan-id=0
set 11 default-vlan-id=0
/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 group-ciphers=
tkip,aes-ccm group-key-update=1h mode=dynamic-keys supplicant-identity=
MikroTik unicast-ciphers=tkip,aes-ccm wpa-pre-shared-key=foldertriton13
wpa2-pre-shared-key=foldertriton13
add authentication-types=wpa-psk,wpa2-psk group-ciphers=tkip,aes-ccm
management-protection=allowed mode=dynamic-keys name=my-wlan-security-profile
supplicant-identity=MikroTik unicast-ciphers=tkip,aes-ccm
wpa-pre-shared-key=my-pW wpa2-pre-shared-key=my-pW
/interface wireless
add disabled=no keepalive-frames=disabled mac-address=76:4D:28:4A:DB:33
master-interface=name02 multicast-buffering=disabled name=
name01 security-profile=my-wlan-security-profile ssid=name01 wds-cost-range=0
wds-default-cost=0
set [ find default-name=wlan1 ] antenna-gain=3 band=5ghz-a/n/ac
channel-width=20/40/80mhz-XXXX country=my-country disabled=no distance=
indoors frequency-mode=regulatory-domain installation=indoor mode=
ap-bridge name=name01_5G security-profile=my-wlan-security-profile ssid=name01_5G
wireless-protocol=802.11
/interface wireless nstreme
set name01_5G enable-nstreme=yes
/ip ipsec policy group
add name="L2TP VPN guests"
/ip ipsec proposal
set [ find default=yes ] enc-algorithms=aes-256-cbc,aes-256-ctr,3des
lifetime=8h pfs-group=none
add enc-algorithms=aes-256-cbc,aes-256-ctr,3des name=L2tp-proposal1
pfs-group=none
/ip pool
add name=dhcp ranges=192.168.126.20-192.168.126.99
add name=pptp-server-pool ranges=192.168.126.180-192.168.126.190
add name=dhcp2 ranges=192.168.125.11-192.168.125.99
/ip dhcp-server
add add-arp=yes address-pool=dhcp disabled=no interface=bridge lease-time=1h
name=my-DHCP
/ip ipsec mode-config
add address-pool=pptp-server-pool name="L2TP VPN guests" split-include=
192.168.124.0/22
/ppp profile
add bridge=bridge change-tcp-mss=yes insert-queue-before=first local-address=
192.168.126.1 name=vpn-general remote-address=pptp-server-pool
use-encryption=yes use-upnp=no
add bridge=bridge name=voip-low-security remote-address=pptp-server-pool
use-encryption=yes
add bridge=bridge change-tcp-mss=yes local-address=192.168.126.1 name=A8000
remote-address=192.168.126.192 use-encryption=yes use-upnp=yes
add bridge=bridge change-tcp-mss=yes local-address=192.168.126.180 name=
vpn-test remote-address=pptp-server-pool use-compression=yes
use-encryption=yes use-upnp=yes
/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=ether6
add bridge=bridge comment=defconf interface=ether7
add bridge=bridge comment=defconf interface=ether8
add bridge=bridge comment=defconf interface=ether9
add bridge=bridge comment=defconf interface=ether10
add bridge=bridge comment=defconf interface=sfp-sfpplus1
add bridge=bridge comment=defconf interface=name01_5G
add bridge=bridge comment=defconf interface=name02
add bridge=bridge interface=name01
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface l2tp-server server
set authentication=mschap2 enabled=yes ipsec-secret=my-pW use-ipsec=yes
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ether1 list=WAN
/interface pptp-server server
set enabled=yes
/ip address
add address=192.168.126.1/22 comment=defconf interface=bridge network=
192.168.124.0
add address=my-public-ip/30 interface=ether1 network=my-public-network
add address=192.168.126.1/22 disabled=yes interface=ether2 network=
192.168.124.0
/ip arp
add address=192.168.125.113 interface=bridge published=yes
/ip dhcp-client
add comment=defconf dhcp-options=hostname,clientid interface=ether1
/ip dhcp-server network
add address=192.168.124.0/22 comment=defconf dns-server=192.168.126.1
gateway=192.168.126.1 netmask=22
/ip dns
set allow-remote-requests=yes servers=84.2.46.1,8.8.8.8,8.8.4.4
/ip dns static
.
.
.
.
/ip firewall address-list
add address=192.168.124.0/22 list=lan-stuff
/ip firewall filter
add action=fasttrack-connection chain=forward comment="defconf: fasttrack"
connection-state=established,related
add action=accept chain=input comment="default configuration" protocol=icmp
add action=accept chain=input comment="default configuration"
connection-state=established
add action=accept chain=input comment="default configuration"
connection-state=related
add action=accept chain=input dst-port=1723 protocol=tcp
add action=accept chain=input protocol=gre
add action=accept chain=input src-address=192.168.227.0/24
add action=accept chain=input comment="allow IPsec NAT" dst-port=4500
protocol=udp
add action=accept chain=input comment="allow IKE" dst-port=500 protocol=udp
add action=accept chain=input dst-address=my-public-ip dst-port=1701,500,4500
port="" protocol=udp
add action=accept chain=input dst-address=my-public-ip protocol=ipsec-esp
add action=accept chain=input dst-address=my-public-ip protocol=ipsec-ah
add action=accept chain=input comment="allow sstp" dst-port=443 protocol=tcp
add action=accept chain=forward dst-port=502 protocol=tcp src-address=
192.168.126.0/24
add action=accept chain=forward dst-port=102 in-interface-list=all protocol=
tcp src-address=192.168.126.0/24
add action=accept chain=forward dst-address=192.168.227.0/24
add action=accept chain=forward comment="default configuration"
connection-state=established
add action=accept chain=forward comment="default configuration"
connection-state=related
add action=drop chain=input comment="default configuration" in-interface=
ether1
add action=drop chain=forward comment="default configuration"
connection-state=invalid
/ip firewall nat
add action=masquerade chain=srcnat comment="default configuration"
out-interface=ether1
add action=dst-nat chain=dstnat disabled=yes dst-address=192.168.126.193
dst-port=102 protocol=tcp to-addresses=10.96.150.14 to-ports=102
add action=masquerade chain=srcnat comment="masq. vpn traffic" src-address=
192.168.124.0/22
/ip route
add distance=1 gateway=my-public-gateway
/ip upnp
set enabled=yes show-dummy-rule=no
/ip upnp interfaces
add interface=ether1 type=external
add interface=bridge type=internal
/ppp secret
.
.
.
.
/system leds
add interface=name02 leds="name02_signal1-led,name02_signal2
-led,name02_signal3-led,name02_signal4-led,name02_signal
5-led" type=wireless-signal-strength
add interface=name02 leds=name02_tx-led type=interface-transmit
add interface=name02 leds=name02_rx-led type=interface-receive
/system ntp client
set enabled=yes primary-ntp=193.6.176.59
/system package update
set channel=long-term
/system routerboard settings
set auto-upgrade=yes
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN