Good day,
I have successfully setup a “Road Warrior” Client to a MikroTik VPN server using IPSEC with IKEv2 on my HAP AC^2. I’m able to connect consistently, run RDP to the device I need to control, and all is mostly well. However, RDP is quite slow/jerky and when I run a bandwidth test using iperf3 through the tunnel, I consistently get 11.5Mbps. The connection at work is about 60 Mbps down, 10 Mbps up and 69 ms delay while the connection at home is 120 Mbps down, 10 Mbps up and 72 ms delay.
I’ve read as many of the forum posts about this as I could find, and I’ve tried tinkering with the MSS to ensure I’m not fragmenting unnecessarily. Currently, I have the MSS set in and out by clamp to PMTU mangle rules on my WAN interface. I’ve tried static MSS settings with mangle as well. I know the max MTU is 1400 limited by the Windows 10 VPN client. I fiddled with that setting as well without any luck. Both computers are running Windows 10 Pro and the client computer (laptop) is connecting through the built in VPN client.
I’ve checked the CPU using profiles, and it never gets above 15% even with video playing or with a iperf3 test between my computers.
When the IPSEC tunnel is established, I have two installed SAs that have the same two IP address just opposite for SRC and DST. One IP is the Comcast dynamic WAN IP for my work network (Work.WAN.IP) and the other is the Linksys static WAN IP for my Mikrotik on the network at home (192.168.1.123). The Linksys has a Comcast dynamic WAN IP and is setup with port forwarding for UDP 4500 and 500.
I’m not sure what to do next. Maybe that’s just the best bandwidth the two networks can provide given the upload speeds? It’s probably a silly setting I’ve missed since this is my first MikroTik and first real experience with routing. I’m at a loss though after 20-30 hours of reading and trying different things.
My config is below, and I’ve also attached an image of my networks. Any help from the experts here is so very welcome!
# oct/25/2019 15:03:55 by RouterOS 6.45.6
# software id = L0AF-NAW4
#
# model = RBD52G-5HacD2HnD
/interface bridge
add admin-mac=74:4D:28:75:75:58 auto-mac=no comment=defconf name=bridge
/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 disabled=yes interface=wlan2
/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=wlan2 list=WAN
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=20/40mhz-XX \
disabled=no distance=indoors frequency=auto mode=ap-bridge ssid=\
MikroTik-75755C wireless-protocol=802.11
set [ find default-name=wlan2 ] band=5ghz-a/n/ac channel-width=\
20/40/80mhz-Ceee disabled=no distance=indoors frequency=5745 \
security-profile=jeff ssid="Home Linksys Router" \
wireless-protocol=802.11
/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa2-psk mode=dynamic-keys \
supplicant-identity=MikroTik
add authentication-types=wpa2-psk management-protection=allowed mode=\
dynamic-keys name=jeff supplicant-identity=MikroTik
/interface sstp-server server
set authentication=mschap2 certificate=server2 default-profile=sstp01 \
enabled=yes force-aes=yes max-mru=1400 max-mtu=1400 pfs=yes tls-version=\
only-1.2
/ppp profile
add dns-server=192.168.1.1 local-address=192.168.88.1 name=sstp01 rate-limit=\
9M/9M remote-address="SSTP VPN" use-encryption=required
/ppp secret
add local-address=192.168.88.1 name=personalremoved profile=sstp01 remote-address=\
192.168.88.14 service=sstp
/ip hotspot profile
set [ find default=yes ] html-directory=flash/hotspot
/ip ipsec policy
add dst-address=192.168.77.0/24 group=ike2-policies proposal=ike2 \
src-address=0.0.0.0/0 template=yes
/ip ipsec proposal
add auth-algorithms=sha256 enc-algorithms=aes-128-cbc lifetime=12h name=ike2 \
pfs-group=modp2048
/ip ipsec policy group
add name=ike2-policies
/ip ipsec peer
add exchange-mode=ike2 name=ike2 passive=yes profile=ike2
/ip ipsec identity
add auth-method=digital-signature certificate=server2 generate-policy=\
port-strict mode-config=ike2-conf peer=ike2 policy-template-group=\
ike2-policies remote-certificate=rw-client1
/ip ipsec profile
add dh-group=modp2048 enc-algorithm=aes-128 hash-algorithm=sha256 name=ike2
/ip ipsec mode-config
add address-pool=ike2-pool address-prefix-length=32 name=ike2-conf \
split-include=192.168.88.0/24
/ip pool
add name=dhcp ranges=192.168.88.15-192.168.88.254
add name="SSTP VPN" ranges=192.168.88.10-192.168.88.14
add name=ike2-pool ranges=192.168.77.10-192.168.77.14
/ip dhcp-server
add address-pool=dhcp disabled=no interface=bridge name=defconf
/ip neighbor discovery-settings
set discover-interface-list=LAN
/ip address
add address=192.168.88.1/24 comment=defconf interface=bridge network=\
192.168.88.0
/ip arp
add address=192.168.88.14 interface=bridge published=yes
add address=192.168.88.251 interface=bridge mac-address=1C:69:7A:02:AA:0F
add address=192.168.88.10 disabled=yes interface=bridge published=yes
/ip dhcp-client
add comment=defconf dhcp-options=hostname,clientid disabled=no interface=\
wlan2
/ip dhcp-server lease
add address=192.168.88.251 client-id=1:1c:69:7a:2:aa:f mac-address=\
1C:69:7A:02:AA:0F server=defconf
/ip dhcp-server network
add address=192.168.88.0/24 comment=defconf gateway=192.168.88.1
/ip dns
set allow-remote-requests=yes servers=8.8.8.8,8.8.4.4
/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=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-mark=!ipsec connection-state=established,related
add action=accept chain=forward comment=\
"defconf: accept established,related, untracked" connection-state=\
established,related,untracked
add action=accept chain=input dst-port=443 protocol=tcp
add action=accept chain=input dst-port=500 protocol=udp
add action=accept chain=input dst-port=4500 protocol=udp
add action=accept chain=forward comment="Whitelist RDP through VPN" dst-port=\
3389 protocol=tcp src-address=192.168.88.10-192.168.88.14
add action=accept chain=forward dst-port=3389 protocol=tcp src-address=\
192.168.77.10-192.168.77.14
add action=reject chain=forward comment="Block RDP Brute Force" log-prefix=\
Blocked reject-with=icmp-network-unreachable src-address-list=Blocked
add action=add-src-to-address-list address-list=Blocked address-list-timeout=\
1w3d chain=forward connection-state=new dst-port=3389 log=yes log-prefix=\
"RDP BRUTEFORCE - " protocol=tcp src-address-list=rdp_stage3
add action=add-src-to-address-list address-list=rdp_stage3 \
address-list-timeout=5m chain=forward connection-state=new dst-port=3389 \
protocol=tcp src-address-list=rdp_stage2
add action=add-src-to-address-list address-list=rdp_stage2 \
address-list-timeout=5m chain=forward connection-state=new dst-port=3389 \
protocol=tcp src-address-list=rdp_stage1
add action=add-src-to-address-list address-list=rdp_stage1 \
address-list-timeout=5m chain=forward connection-state=new dst-port=3389 \
protocol=tcp
add action=accept chain=input src-address=192.168.88.0/24
add action=accept chain=forward src-address=192.168.88.0/24
add action=drop chain=input comment="defconf: drop all not coming from LAN" \
in-interface-list=!LAN
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=drop chain=input connection-state=new dst-port=53 in-interface=\
wlan2 protocol=udp
add action=drop chain=input connection-state=new dst-port=53 in-interface=\
wlan2 protocol=tcp
/ip firewall mangle
add action=mark-connection chain=forward comment=\
"mark ipsec connections to exclude them from fasttrack" ipsec-policy=\
in,ipsec new-connection-mark=ipsec
add action=mark-connection chain=forward comment=\
"mark ipsec connections to exclude them from fasttrack" ipsec-policy=\
out,ipsec new-connection-mark=ipsec
add action=change-mss chain=forward connection-mark=ipsec disabled=yes log=\
yes log-prefix=MSS new-mss=1360 passthrough=yes protocol=tcp tcp-flags=\
syn tcp-mss=!0-1360
add action=change-mss chain=forward new-mss=clamp-to-pmtu out-interface=wlan2 \
passthrough=yes protocol=tcp tcp-flags=syn tcp-mss=1401-65535
add action=change-mss chain=forward in-interface=wlan2 new-mss=clamp-to-pmtu \
passthrough=yes protocol=tcp tcp-flags=syn tcp-mss=1401-65535
/ip firewall nat
add action=masquerade chain=srcnat out-interface=wlan2 src-address=\
192.168.88.0/24
add action=masquerade chain=srcnat comment="defconf: masquerade" \
ipsec-policy=out,none out-interface-list=WAN
/ip ssh
set allow-none-crypto=yes forwarding-enabled=remote
/system logging action
add memory-lines=100 name=ipsec target=memory
/system clock
set time-zone-name=America/Chicago
/system logging
add disabled=yes topics=sstp
add disabled=yes topics=certificate
add action=ipsec prefix=" " topics=ipsec
/system watchdog
set auto-send-supout=yes watch-address=8.8.8.8
/tool bandwidth-server
set enabled=no
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN

