Wed Oct 13, 2021 1:05 am
You are right regarding security issues, i have fixed in another customer with same failover problem. This is the configuration: (with some time i will fixit in every customer)
# oct/12/2021 18:58:34 by RouterOS 6.48.1
# software id =
#
# model = RB951Ui-2nD
# serial number =
/interface l2tp-server
add name=l2tp-XXXX user=xxxx
/interface bridge
add admin-mac=74:4D:28: arp=proxy-arp auto-mac=no comment=defconf \
name=bridge
/interface ethernet
set [ find default-name=ether1 ] comment=Telecentro mac-address=\
74:4D:28:
set [ find default-name=ether2 ] comment=Fibertel mac-address=\
74:4D:28:
set [ find default-name=ether3 ] mac-address=74:4D:28:
set [ find default-name=ether4 ] mac-address=74:4D:28:
set [ find default-name=ether5 ] mac-address=74:4D:28:
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/ip pool
add name=default-dhcp ranges=192.168.0.100-192.168.0.199
/ip dhcp-server
add address-pool=default-dhcp disabled=no interface=bridge name=defconf
/ppp profile
add local-address=default-dhcp name=l2tp remote-address=default-dhcp
/interface bridge port
add bridge=bridge comment=defconf interface=ether3
add bridge=bridge comment=defconf interface=ether4
add bridge=bridge comment=defconf interface=ether5
add bridge=bridge interface=wlan1
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface l2tp-server server
set authentication=mschap2 default-profile=l2tp enabled=yes use-ipsec=\
required
/interface list member
add interface=bridge list=LAN
add interface=ether1 list=WAN
add interface=ether2 list=WAN
add interface=l2tp-XXXX list=LAN
/ip address
add address=192.168.0.1/24 comment=defconf interface=bridge network=\
192.168.0.0
/ip cloud
set ddns-enabled=yes ddns-update-interval=5m
/ip dhcp-client
add add-default-route=no disabled=no interface=ether1
add default-route-distance=2 disabled=no interface=ether2 use-peer-dns=no
/ip dhcp-server network
add address=192.168.0.0/24 comment=defconf gateway=192.168.0.1
/ip dns
set allow-remote-requests=yes cache-max-ttl=1d servers=\
8.8.8.8,8.8.4.4,1.1.1.1
/ip dns static
add address=192.168.0.1 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=drop chain=input comment="deny external dns request" \
connection-state=new dst-port=53 in-interface-list=WAN log-prefix=\
dnsqueries protocol=udp
add action=drop chain=input connection-state=new dst-port=53 \
in-interface-list=WAN protocol=tcp
add action=accept chain=input comment="vpn l2tp" protocol=ipsec-esp
add action=accept chain=input dst-port=1701,500,4500 protocol=udp
add action=drop chain=input comment="block WAN ping" in-interface-list=WAN \
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=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-list=WAN
/ip firewall service-port
set ftp disabled=yes
set tftp disabled=yes
set irc disabled=yes
set h323 disabled=yes
set sip disabled=yes
set dccp disabled=yes
/ip route
add check-gateway=ping distance=1 gateway=xxx.xxx.154.129
add distance=1 dst-address=xxx.xxx.154.129/32 gateway=xxx.xxx.220.1 scope=10
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www address=192.168.0.0/24 disabled=yes
set ssh disabled=yes
set api disabled=yes
set api-ssl disabled=yes
/ppp secret
add name=XXXX profile=l2tp service=l2tp
/system clock
set time-zone-name=America/Argentina/Buenos_Aires
/system identity
set name=XXXXXXXXXXXXX
/system ntp client
set enabled=yes primary-ntp=168.96.251.195 secondary-ntp=200.160.7.186 \
server-dns-names=8.8.8.8,8.8.4.4,1.1.1.1
/tool bandwidth-server
set enabled=no
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN
Last edited by
alemoia on Wed Oct 13, 2021 2:52 am, edited 1 time in total.