I operate on Mikrotik at home and one as access point if we are on holiday. Until now I used OpenVPN, but the performance isn't any longer acceptable, therefore I wanna change to IPsec/L2TP. The site to site connection works fine, but the tunneling of the holiday network towards the internet through the tunnel doesn't. If I do a traceroute from a client the traffic goes through my MT at home. Pinging clients in the internet work also fine, but using WWW doesn't . Something whith the back route must be wrong.
The config of the access point (here all the local traffic should be passed through the tunnel) looks like
Code: Select all
# 2024-06-18 19:23:53 by RouterOS 7.15.1
# software id = PNQD-S7HH
#
# model = RBD53iG-5HacD2HnD
/ip ipsec profile
add dh-group=modp1024 enc-algorithm=aes-256 name=ipsec-profile nat-traversal=\
no
/ip ipsec peer
add address=172.16.2.1/32 name=peer1 profile=ipsec-profile
/ip ipsec proposal
set [ find default=yes ] enc-algorithms=aes-256-cbc
/ppp profile
set *0 use-encryption=no use-ipv6=no
/interface l2tp-client
add connect-to=hh.lange-online.net disabled=no name=l2tp-HH profile=default \
use-peer-dns=yes user=ipsec-urlaub
/ip address
add address=192.168.55.254/24 interface=lokalesNetz network=192.168.55.0
/ip firewall filter
add action=drop chain=input connection-state=invalid
add action=drop chain=forward connection-state=invalid
add action=accept chain=input connection-state=established,related
add action=accept chain=forward connection-state=established,related
add action=accept chain=forward in-interface=lokalesNetz
add action=accept chain=input in-interface=lokalesNetz
add action=drop chain=input ipsec-policy=in,ipsec
add action=drop chain=forward ipsec-policy=in,ipsec
/ip firewall nat
add action=masquerade chain=srcnat comment="Maskierung ausgehender Verkehr" \
ipsec-policy=out,none out-interface=ether1
add action=masquerade chain=srcnat comment="Maskierung ausgehender Verkehr" \
ipsec-policy=out,none log=yes log-prefix="MASK: " out-interface=lte1
/ip ipsec identity
add peer=peer1
/ip ipsec policy
add dst-address=192.168.51.0/24 peer=peer1 src-address=192.168.55.0/24 \
tunnel=yes
add dst-address=192.168.53.0/24 peer=peer1 src-address=192.168.55.0/24 \
tunnel=yes
add dst-address=0.0.0.0/0 peer=peer1 src-address=192.168.55.0/24 tunnel=yes
Code: Select all
# jun/18/2024 18:59:25 by RouterOS 6.49.15
# software id = D5X7-MT4X
#
# model = CRS125-24G-1S
/ip ipsec profile
set [ find default=yes ] dh-group=modp1024 enc-algorithm=aes-256
add dh-group=modp1024 enc-algorithm=aes-256 name=ipsec-profile nat-traversal=\
no
/ip ipsec peer
add address=172.16.2.2/32 name=ipsec-peer-hh profile=ipsec-profile \
send-initial-contact=no
/ip ipsec proposal
set [ find default=yes ] enc-algorithms=aes-256-cbc lifetime=8h
/interface l2tp-server server
set allow-fast-path=yes default-profile=default enabled=yes
/ip address
add address=192.168.51.254/24 interface=bridge-51-privat network=192.168.51.0
add address=192.168.54.254/24 interface=bridge-54-untrusted network=\
192.168.54.0
add address=192.168.52.254/24 interface=bridge-52-gast network=192.168.52.0
add address=192.168.53.254/24 interface=bridge-53-ha network=192.168.53.0
/ip firewall filter
add action=fasttrack-connection chain=forward connection-state=\
established,related
add action=drop chain=input comment="defekte Pakete vewerden (input)" \
connection-state=invalid
add action=drop chain=forward comment="defekte Pakete vewerden (forward)" \
connection-state=invalid
add action=accept chain=forward comment=\
"established&related zugelassen (forward)" connection-state=\
established,related
add action=accept chain=input comment=\
"established&related zugelassen (input)" connection-state=\
established,related
add action=accept chain=input comment=\
"DHCP/NTP/SYSLOG erlaubt nur nicht von aussen (input)" dst-port=\
67,68,123,514 in-interface=!PPPoE-Geesthacht protocol=udp
add action=accept chain=forward comment="DHCP/NTP/SYSLOG untrusted -> server" \
dst-address=192.168.51.230 dst-port=67,68,123,514 in-interface=\
bridge-54-untrusted protocol=udp
add action=accept chain=forward comment=\
"geNATed Verbindungen von au\DFen ok (forward)" connection-nat-state=\
dstnat in-interface=PPPoE-Geesthacht log-prefix=NAT-FW-OK:
add action=accept chain=input comment=\
"geNATed Verbindungen von au\DFen ok (input)" connection-nat-state=dstnat \
in-interface=PPPoE-Geesthacht
add action=accept chain=input comment="private LAN darf alles (input)" \
in-interface=bridge-51-privat
add action=accept chain=forward comment="private LAN darf alles (forward)" \
in-interface=bridge-51-privat log-prefix=privat:
add action=accept chain=input comment="OVPN von au\DFen" dst-port=1194 \
in-interface=PPPoE-Geesthacht protocol=tcp
add action=accept chain=input comment="OVPN-Netz Inout" src-address=\
10.100.10.0/24
add action=accept chain=forward comment="OVPN-Netz Forward" src-address=\
10.100.10.0/24
add action=accept chain=input comment="HomeAssistantServer (input)" \
src-address=192.168.53.1
add action=accept chain=forward comment="HomeAssistantServer (forward)" \
src-address=192.168.53.1
add action=accept chain=forward comment=\
"HA Netz darf nach draussen - fuer update" disabled=yes in-interface=\
bridge-53-ha
add action=accept chain=input comment="HA Netz darf nach drau\DFen" disabled=\
yes in-interface=bridge-53-ha
add action=accept chain=forward comment=\
"Gast-LAN darf nach draussen (forward)" in-interface=bridge-52-gast \
log-prefix=GAST: out-interface=PPPoE-Geesthacht
add action=accept chain=forward comment="Gast-LAN darf zum Server" \
dst-address=192.168.51.230 in-interface=bridge-52-gast
add action=accept chain=forward comment=\
"untrusted-LAN darf nach drau\DFen (forward)" in-interface=\
bridge-54-untrusted out-interface=PPPoE-Geesthacht
add action=accept chain=input comment="Log auf Server" dst-address=\
192.168.51.200 dst-port=514 in-interface=!PPPoE-Geesthacht protocol=udp
add action=accept chain=input comment="SSH auf Router von au\DFen" disabled=\
yes dst-port=22 in-interface=PPPoE-Geesthacht protocol=tcp
add action=accept chain=forward comment="L2TP Forward" src-address=\
172.16.2.0/24
add action=accept chain=input comment="L2TP input" src-address=172.16.2.0/24
add action=accept chain=input comment="L2TP TCP Input" dst-port=1701 \
in-interface=PPPoE-Geesthacht protocol=tcp
add action=accept chain=input comment="L2TP UDP Input" dst-port=1701 \
in-interface=PPPoE-Geesthacht protocol=udp
add action=accept chain=input comment="L2TP UDP INPUT" dst-port=500,4500 \
in-interface=PPPoE-Geesthacht protocol=udp
add action=accept chain=forward comment="Urlaubsnetz forward" src-address=\
192.168.55.0/24
add action=accept chain=input comment="Urlaubsnetz input" src-address=\
192.168.55.0/24
add action=drop chain=forward comment="Drop intern (forward)" disabled=yes \
in-interface=!PPPoE-Geesthacht log=yes log-prefix=Drop-int-forward
add action=drop chain=input comment="Drop intern (input)" disabled=yes \
in-interface=!PPPoE-Geesthacht log=yes log-prefix=Drop-int-input
add action=drop chain=input comment="Orkus (input)" log-prefix=drop-input:
add action=drop chain=forward comment="Orkus (forward)" log-prefix=\
drop-forward:
/ip firewall nat
add action=masquerade chain=srcnat comment=\
"Maskierung des Traffics nach draussen - IPSEC NETZ!" log=yes log-prefix=\
MASQ-IPSEC: out-interface=PPPoE-Geesthacht src-address=192.168.55.0/24
add action=masquerade chain=srcnat comment=\
"Maskierung des Traffics nach draussen" log-prefix=MASQ: out-interface=\
PPPoE-Geesthacht
add action=masquerade chain=srcnat comment="Hairpin Web-Server" dst-address=\
192.168.51.230 dst-port=80,443 log-prefix=Apache-Hair: protocol=tcp \
src-address=192.168.51.0/24
add action=dst-nat chain=dstnat comment="Port-forwarding Web-Server" \
dst-address=!192.168.51.254 dst-address-type=local dst-port=80,443 \
log-prefix=NAT-WEB protocol=tcp to-addresses=192.168.51.230
add action=dst-nat chain=dstnat comment="port-forwarding openDTU" disabled=\
yes dst-address=!192.168.51.254 dst-address-type=local dst-port=83 log=\
yes log-prefix="opendtu-port-forward: " protocol=tcp to-addresses=\
192.168.53.71 to-ports=80
add action=dst-nat chain=dstnat comment="BTEST UDP" disabled=yes dst-address=\
!192.168.51.254 dst-address-type=local dst-port=2000-2200 log-prefix=\
NAT-WEB protocol=udp to-addresses=192.168.51.21
add action=dst-nat chain=dstnat comment="BTEST TCP" disabled=yes dst-address=\
!192.168.51.254 dst-address-type=local dst-port=2000-2200 log-prefix=\
NAT-WEB protocol=tcp to-addresses=192.168.51.21
add action=masquerade chain=srcnat comment="Harpin Turn-Server TCP" \
dst-address=192.168.51.230 dst-port=3478 out-interface=bridge-51-privat \
protocol=tcp src-address=192.168.51.0/24
add action=masquerade chain=srcnat comment="Hairpin Turn-Server UDP" \
dst-address=192.168.51.230 dst-port=3478 log-prefix=Server2-Hair: \
out-interface=bridge-51-privat protocol=udp src-address=192.168.51.0/24
add action=dst-nat chain=dstnat comment="Port-forwarding TURN TCP" \
dst-address=!192.168.51.254 dst-address-type=local dst-port=3478 \
log-prefix=TURN-TCP protocol=tcp to-addresses=192.168.51.230 to-ports=\
3478
add action=dst-nat chain=dstnat comment="Port-forwarding TURN UDP" \
dst-address=!192.168.51.254 dst-address-type=local dst-port=3478 \
protocol=udp to-addresses=192.168.51.230 to-ports=3478
add action=masquerade chain=srcnat comment="hairpin openDTU" disabled=yes \
dst-address=192.168.53.71 dst-port=8888 protocol=tcp src-address=\
192.168.51.0/24
/ip ipsec identity
add peer=ipsec-peer-hh
/ip ipsec policy
add dst-address=192.168.55.0/24 peer=ipsec-peer-hh src-address=\
192.168.51.0/24 tunnel=yes
add dst-address=192.168.55.0/24 peer=ipsec-peer-hh src-address=\
192.168.53.0/24 tunnel=yes
add dst-address=192.168.55.0/24 peer=ipsec-peer-hh src-address=0.0.0.0/0 \
tunnel=yes
/ppp secret
add local-address=172.16.2.1 name=ipsec-urlaub remote-address=172.16.2.2 \
service=l2tp
BR Holger