Oke update na alles te hebben verwerken, of althans dat geprobeerd te hebben.
Goede nieuws, alles lijkt nu te werken. Note, ik heb 1.1.1.1 ingesteld op mijn iPhone als DNS, tutorial geeft aan dat je 192.168.100.1 (je wireguard endpoint) zou moeten opgeven maar dan heb ik geen connectie naar WAN meer.
Mijn huidige IP configuratie:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
| [admin@MikroTik] > /ip/firewall/export
# jun/05/2023 16:50:57 by RouterOS 7.9.1
# software id = VA5L-47PT
#
# model = RB2011iLS
/ip firewall address-list
add address=xxxxxx.sn.mynetname.net list="WAN IP"
add address=192.168.0.0/24 list=LAN
add address=192.168.100.0/24 list=Wireguard1
/ip firewall connection tracking
set udp-timeout=20s
/ip firewall filter
add action=drop chain=input connection-state=invalid
add action=accept chain=input src-address-list=LAN
add action=accept chain=input disabled=yes src-address-list=Wireguard1
add action=accept chain=input comment="defconf: accept established,related" connection-state=established,related
add action=accept chain=input comment="Allow SIP" dst-port=3865 protocol=tcp
add action=accept chain=input connection-type=sip
add action=accept chain=input comment=Wireguard dst-port=13231 in-interface=ether1-wan protocol=udp
add action=accept chain=input comment="defconf: accept ICMP local" in-interface=!ether1-wan protocol=icmp
add action=drop chain=input
add action=drop chain=forward comment="defconf: drop invalid" connection-state=invalid
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" connection-state=established,related hw-offload=yes
add action=accept chain=forward connection-state=new src-address-list=LAN
add action=accept chain=forward connection-state=new disabled=yes src-address-list=Wireguard1
add action=accept chain=forward comment="defconf: accept established,related" connection-state=established,related
add action=drop chain=forward comment="defconf: drop all from WAN not DSTNATed" connection-state=new in-interface=ether1-wan
/ip firewall nat
add action=masquerade chain=srcnat comment="Hairpin NAT" dst-address=192.168.0.0/24 src-address=192.168.0.0/24
add action=masquerade chain=srcnat comment="defconf: masquerade" out-interface=ether1-wan
add action=masquerade chain=srcnat comment="Wireguard to WAN" out-interface=ether1-wan src-address=192.168.100.0/24
/ip firewall service-port
set sip disabled=yes |
code:
1
2
3
4
5
6
7
8
9
| [admin@MikroTik] > /interface/wireguard export
# jun/05/2023 16:55:09 by RouterOS 7.9.1
# software id = VA5L-47PT
#
# model = RB2011iLS
/interface wireguard
add listen-port=13231 mtu=1420 name=wireguard1
/interface wireguard peers
add allowed-address=192.168.100.2/32 interface=wireguard1 public-key="xxxxxxx" |
Op mijn telefoon heb ik op de interface 192.168.100.2/32 als adres en 1.1.1.1 als DNS server.
Bij peer heb ik bij allowed IPs 0.0.0.0/0 staan.
[
Voor 8% gewijzigd door
mhaket op 05-06-2023 17:34
. Reden: Correctie omdat setup nu wel lijkt te werken. ]