Hi all.
I read a lot of @anav posts about wg config but I still need a helping hand for configuring my LTE18ax with VPN provider config.
Proton VPN has a manual but as mentioned forum guru recommended I didn't try their instructions.
I would like to make the following:
-route all Guest wifi (wifi3 and wifi4) )users trough wireguard_guest interface
-BackToHome will still work for wifi1 and wifi2 and ether* devices?
So here is my current config which I would like to preserve as much as possible (DoH, Back to home/ZeroTier)
I read a lot of @anav posts about wg config but I still need a helping hand for configuring my LTE18ax with VPN provider config.
Proton VPN has a manual but as mentioned forum guru recommended I didn't try their instructions.
I would like to make the following:
-route all Guest wifi (wifi3 and wifi4) )users trough wireguard_guest interface
-BackToHome will still work for wifi1 and wifi2 and ether* devices?
So here is my current config which I would like to preserve as much as possible (DoH, Back to home/ZeroTier)
They provided me with the following data for the wireguard config:# 2023-12-12 16:49:57 by RouterOS 7.12.1
# software id = UAT7-31VF
#
# model = S53UG+5HaxD2HaxD&EG18-EA
# serial number = ***
/interface bridge
add admin-mac=*** auto-mac=no comment=defconf name=bridge
/interface wifiwave2
set [ find default-name=wifi1 ] channel.skip-dfs-channels=10min-cac configuration.country=Serbia .mode=ap .ssid=\
"***_WiFi 5GHz" disabled=no mtu=1500 security.authentication-types=wpa2-psk,wpa3-psk .encryption=""
set [ find default-name=wifi2 ] channel.skip-dfs-channels=10min-cac configuration.country=Serbia .mode=ap .ssid=\
"***_IoT 2.4GHz" disabled=no mtu=1500 security.authentication-types=wpa2-psk,wpa3-psk .encryption=""
add configuration.mode=ap .ssid=***_Guest disabled=no mac-address=*** master-interface=wifi1 \
name=wifi3 security.authentication-types=wpa2-psk,wpa3-psk .encryption="" .wps=push-button
add configuration.mode=ap .ssid=***_Guest disabled=no mac-address=*** master-interface=wifi2 \
name=wifi4 security.authentication-types=wpa2-psk,wpa3-psk .encryption="" .wps=push-button
/interface wireguard
add comment=back-to-home-vpn listen-port=11118 mtu=1420 name=back-to-home-vpn
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface lte apn
set [ find default=yes ] apn=default use-network-apn=no
add apn=internet authentication=pap name=Yettel use-peer-dns=no user=yettel
/interface lte
set [ find default-name=lte1 ] allow-roaming=no apn-profiles=Yettel band=""
/ip pool
add name=default-dhcp ranges=192.168.88.10-192.168.88.254
/ip dhcp-server
add address-pool=default-dhcp interface=bridge lease-time=10m name=defconf
/zerotier
set zt1 comment="ZeroTier Central controller - https://my.zerotier.com/" name=zt1 port=9993
/zerotier interface
add allow-default=no allow-global=no allow-managed=yes disabled=no instance=zt1 name=zerotier1 network=\
***
/interface bridge filter
add action=drop chain=forward in-interface=wifi3
add action=drop chain=forward out-interface=wifi3
add action=drop chain=forward in-interface=wifi4
add action=drop chain=forward out-interface=wifi4
/interface bridge port
add bridge=bridge comment=defconf interface=ether1
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=wifi1
add bridge=bridge comment=defconf interface=wifi2
add auto-isolate=yes bridge=bridge interface=wifi3
add auto-isolate=yes bridge=bridge interface=wifi4
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface detect-internet
set detect-interface-list=all
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=lte1 list=WAN
/interface wireguard peers
add allowed-address=192.168.216.3/32,fc00:0:0:216::3/128 comment="MikroTik Home | samsung SM-***" interface=\
back-to-home-vpn persistent-keepalive=30s public-key="***"
/ip address
add address=192.168.88.1/24 comment=defconf interface=bridge network=192.168.88.0
/ip cloud
set back-to-home-vpn=enabled ddns-enabled=yes ddns-update-interval=10m
/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 use-doh-server=https://dns.nextdns.io/*** verify-doh-cert=yes
/ip dns static
add address=192.168.88.1 comment=defconf name=router.lan
add address=45.90.28.0 name=dns.nextdns.io
add address=45.90.30.0 name=dns.nextdns.io
add address=2a07:a8c0:: name=dns.nextdns.io type=AAAA
add address=2a07:a8c1:: name=dns.nextdns.io type=AAAA
/ip firewall address-list
add address=0.0.0.0/8 comment=RFC6890 list=not_in_internet
add address=172.16.0.0/12 comment=RFC6890 list=not_in_internet
add address=192.168.0.0/16 comment=RFC6890 list=not_in_internet
add address=10.0.0.0/8 comment=RFC6890 list=not_in_internet
add address=169.254.0.0/16 comment=RFC6890 list=not_in_internet
add address=127.0.0.0/8 comment=RFC6890 list=not_in_internet
add address=224.0.0.0/4 comment=Multicast list=not_in_internet
add address=198.18.0.0/15 comment=RFC6890 list=not_in_internet
add address=192.0.0.0/24 comment=RFC6890 list=not_in_internet
add address=192.0.2.0/24 comment=RFC6890 list=not_in_internet
add address=198.51.100.0/24 comment=RFC6890 list=not_in_internet
add address=203.0.113.0/24 comment=RFC6890 list=not_in_internet
add address=100.64.0.0/10 comment=RFC6890 list=not_in_internet
add address=240.0.0.0/4 comment=RFC6890 list=not_in_internet
add address=192.88.99.0/24 comment="6to4 relay Anycast [RFC 3068]" list=not_in_internet
/ip firewall filter
add action=accept chain=forward comment="ZeroTier ***" in-interface=zerotier1
add action=accept chain=input comment="ZeroTier ***" in-interface=zerotier1
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 \
hw-offload=yes
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
add action=redirect chain=dstnat dst-port=53 protocol=tcp
add action=redirect chain=dstnat dst-port=53 protocol=udp
/ip firewall service-port
set irc disabled=no
set rtsp disabled=no
/ip service
set telnet disabled=yes
set api disabled=yes
set api-ssl disabled=yes
/ip upnp
set enabled=yes
/ip upnp interfaces
add interface=bridge type=internal
add interface=lte1 type=external
/ipv6 firewall address-list
add address=::/128 comment="defconf: unspecified address" list=bad_ipv6
add address=::1/128 comment="defconf: lo" list=bad_ipv6
add address=fec0::/10 comment="defconf: site-local" list=bad_ipv6
add address=::ffff:0.0.0.0/96 comment="defconf: ipv4-mapped" list=bad_ipv6
add address=::/96 comment="defconf: ipv4 compat" list=bad_ipv6
add address=100::/64 comment="defconf: discard only " list=bad_ipv6
add address=2001:db8::/32 comment="defconf: documentation" list=bad_ipv6
add address=2001:10::/28 comment="defconf: ORCHID" list=bad_ipv6
add address=3ffe::/16 comment="defconf: 6bone" list=bad_ipv6
/ipv6 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 ICMPv6" protocol=icmpv6
add action=accept chain=input comment="defconf: accept UDP traceroute" port=33434-33534 protocol=udp
add action=accept chain=input comment="defconf: accept DHCPv6-Client prefix delegation." dst-port=546 protocol=udp \
src-address=fe80::/10
add action=accept chain=input comment="defconf: accept IKE" dst-port=500,4500 protocol=udp
add action=accept chain=input comment="defconf: accept ipsec AH" protocol=ipsec-ah
add action=accept chain=input comment="defconf: accept ipsec ESP" protocol=ipsec-esp
add action=accept chain=input comment="defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
add action=drop chain=input comment="defconf: drop everything else not coming from LAN" in-interface-list=!LAN
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 packets with bad src ipv6" src-address-list=bad_ipv6
add action=drop chain=forward comment="defconf: drop packets with bad dst ipv6" dst-address-list=bad_ipv6
add action=drop chain=forward comment="defconf: rfc4890 drop hop-limit=1" hop-limit=equal:1 protocol=icmpv6
add action=accept chain=forward comment="defconf: accept ICMPv6" protocol=icmpv6
add action=accept chain=forward comment="defconf: accept HIP" protocol=139
add action=accept chain=forward comment="defconf: accept IKE" dst-port=500,4500 protocol=udp
add action=accept chain=forward comment="defconf: accept ipsec AH" protocol=ipsec-ah
add action=accept chain=forward comment="defconf: accept ipsec ESP" protocol=ipsec-esp
add action=accept chain=forward comment="defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
add action=drop chain=forward comment="defconf: drop everything else not coming from LAN" in-interface-list=!LAN
/system clock
set time-zone-name=Europe/Belgrade
/system note
set note=Welcome show-at-login=no
/system routerboard settings
set auto-upgrade=yes
/system routerboard mode-button
set enabled=yes on-event=dark-mode
/system script
add dont-require-permissions=no name=dark-mode owner=*** policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source="\
\n :if ([system leds settings get all-leds-off] = \"never\") do={\
\n /system leds settings set all-leds-off=immediate ;\
\n } else={\
\n /system leds settings set all-leds-off=never\
\n }\
\n "
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN
/tool sms
set port=lte1
This is an overview of the VPN provider manual and recommendations from @anav (BOLD is an official guide):[Interface]
# Key for wg_guest
PrivateKey = ***
Address = 10.2.0.2/32
DNS = 10.2.0.1
[Peer]
PublicKey = ***
AllowedIPs = 0.0.0.0/0
Endpoint = 37.46.115.5:51820
/interface wireguard
add listen-port=13231 mtu=1420 name=protonvpnwg1 private-key=”your private key”
/interface/wireguard
add listen-port=13231 name=protonvpnwg1 private-key="your private key"
/ip address
add address=10.2.0.2/30 interface=protonvpnwg1 network=10.2.0.0
/ip address
add address=10.2.0.2/30 interface=protonvpnwg1
/interface wireguard peers
add allowed-address=0.0.0.0/0 endpoint-address=x.x.x.x endpoint-port=xxxxx interface=protonvpnwg1 persistent-keepalive=25s public-key="your public key"
/interface/wireguard/peers
add allowed-address=0.0.0.0/0 endpoint-address=x.x.x.x endpoint-port=xxxxx interface=protonvpnwg1 public-key="your public key" persistent-keep-alive=30s
/ip firewall nat
add action=masquerade chain=srcnat out-interface=protonvpnwg1 src-address=192.168.88.0/24
/ip firewall nat
add action=accept chain=forward in-interface-list=LAN out-interface=protonvpnwg1
add chain=srcnat action=masquerade out-interface=protonvpnwg1
add table
/routing table add fib name=toprotonvpnwg1
add route
add dst-address=0.0.0.0/0 gateway=protonvpnwg1 routing-table=toprotonvpnwg1
add routing rules
add src-address=SINGLE_LANIP action=lookup table=toprotonvpnwg1
/ip route
add disabled=no distance=1 dst-address=0.0.0.0/1 gateway=10.2.0.1 pref-src="" routing-table=main scope=30 suppress-hw-offload=no target-scope=10
add disabled=no distance=1 dst-address=128.0.0.0/1 gateway=10.2.0.1 pref-src="" routing-table=main scope=30 suppress-hw-offload=no target-scope=10
/ip dns
set servers=10.2.0.1
/ip dhcp-client
set 0 use-peer-dns=no
/ip route
add disabled=no dst-address=x.x.x.x/32 gateway=[/ip dhcp-client get [find interface=ether1] gateway] routing-table=main suppress-hw-offload=no
Statistics: Posted by mkuser1 — Tue Dec 12, 2023 6:35 pm