I recently purchased a hAP ax3 and i'm currently rebuilding my homelab with Vlans thanks to RouterOS.
However, I face an issue that i'm not able to resolve.
My issue is that i'm unable to access my services inside my two vlans (or through the wireguard tunnel) using my domain name.
Outside of my network everything works as expected, I can reach my services using the domain name which point to the CNAME of my RouterOS DDNS domain.
I did look around for a few days and tried a few solutions but nothing seems to resolve my issue.
Here are some topics that I think are relevant to my situdation (that I tried the best I could without success):
viewtopic.php?t=190637
viewtopic.php?t=201099
viewtopic.php?t=177853
viewtopic.php?t=146370
I think that I do not need HairPin Nat because I have two different networks.
Can someone point me in the right direction ?
Here is my config export:
Code: Select all
/interface wireguard
add comment=back-to-home-vpn listen-port=26637 mtu=1420 name=back-to-home-vpn
/interface vlan
add interface=local name=Servers vlan-id=102
add interface=local name=Users vlan-id=100
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
add name=listBridge
/ip pool
add name=dhcp_pool_Users ranges=192.168.100.2-192.168.100.126
/ip dhcp-server
add address-pool=dhcp_pool_Users interface=Users lease-time=8h name=\
dhcp_Users
/interface bridge port
add bridge=local comment=defconf interface=ether2 pvid=102
add bridge=local comment=defconf interface=ether3 pvid=100
add bridge=local comment=defconf interface=ether4 pvid=100
add bridge=local comment=defconf interface=ether5 pvid=100
add bridge=local comment=defconf interface=wifi1 pvid=100
add bridge=local comment=defconf interface=wifi2 pvid=100
/ip neighbor discovery-settings
set discover-interface-list=LAN
/ipv6 settings
set disable-ipv6=yes
/interface bridge vlan
add bridge=local tagged=local untagged=ether2 vlan-ids=102
add bridge=local tagged=local untagged=ether3,ether4,ether5,wifi1,wifi2 \
vlan-ids=100
/interface list member
add comment=defconf interface=local list=LAN
add comment=defconf interface=ether1 list=WAN
add interface=Users list=listBridge
add interface=Servers list=listBridge
add comment=defconf interface=Users list=LAN
add comment=defconf interface=Servers list=LAN
/ip address
add address=192.168.102.1/24 interface=Servers network=192.168.102.0
add address=192.168.100.1/25 interface=Users network=192.168.100.0
/ip cloud
set back-to-home-vpn=enabled ddns-enabled=yes
/ip dhcp-client
add comment=defconf dhcp-options=hostname,clientid,vendor-class-identifier \
interface=ether1 use-peer-dns=no use-peer-ntp=no
/ip dhcp-server network
add address=192.168.100.0/25 dns-server=9.9.9.9,149.112.112.112 gateway=\
192.168.100.1
/ip dns
set servers=9.9.9.9,149.112.112.112
/ip dns static
add address=192.168.88.1 comment=defconf name=router.lan
/ip firewall address-list
add address=192.168.102.0/24 list=lan_ips
add address=192.168.100.0/25 list=lan_ips
/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=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 log-prefix=NOTLAN
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=drop chain=forward comment="Inter Vlan filtering" \
dst-address-list=lan_ips src-address-list=lan_ips
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=dst-nat chain=dstnat comment=WG dst-port=51820 in-interface-list=\
WAN protocol=udp to-addresses=192.168.102.3 to-ports=51820
add action=dst-nat chain=dstnat comment="Revproxy http/tcp" dst-port=80 \
in-interface-list=WAN protocol=tcp to-addresses=192.168.102.4 to-ports=80
add action=dst-nat chain=dstnat comment="Revproxy http/udp" dst-port=80 \
in-interface-list=WAN protocol=udp to-addresses=192.168.102.4 to-ports=80
add action=dst-nat chain=dstnat comment="Revproxy http/tcp" dst-port=443 \
in-interface-list=WAN protocol=tcp to-addresses=192.168.102.4 to-ports=\
443
add action=dst-nat chain=dstnat comment="Revproxy http/tcp" dst-port=443 \
in-interface-list=WAN protocol=udp to-addresses=192.168.102.4 to-ports=\
443
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set ssh disabled=yes
set api disabled=yes
set winbox address=192.168.100.0/25,192.168.102.0/24,192.168.216.2/32
set api-ssl disabled=yes
/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" \
dst-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/Madrid
/system note
set show-at-login=no
/system ntp client
set enabled=yes
/system ntp client servers
add address=0.pool.ntp.org
add address=2.pool.ntp.org
add address=3.pool.ntp.org
add address=4.pool.ntp.org
/tool bandwidth-server
set enabled=no
/tool mac-server
set allowed-interface-list=none
/tool mac-server mac-winbox
set allowed-interface-list=LAN
Thank you very much!