network-scripts/wireguard/wg2/mikrotik/wg2.rsc

18 lines
674 B
Text
Raw Normal View History

2025-08-12 23:01:13 -04:00
# WireGuard interface configure
/interface wireguard
add listen-port=13231 mtu=1420 name=wg2 private-key=\
"OEXvhk5+MgNqThAjxuYcAXobUCOC+BnkVLXw3Kwm1V0="
/ip firewall filter
add action=accept chain=input comment=wg-wg2 dst-port=13231 protocol=udp
/ip firewall filter move [/ip firewall filter find comment=wg-wg2] 1
/ip address
add address=10.135.135.1/24 comment=wg-wg2 interface=wg2
# WireGuard client peer configure
/interface wireguard peers
add allowed-address=10.135.135.2/32 comment=\
wg2-client-Pixel4a interface=wg2 \
preshared-key="ts81qK9plBC1Rjc4HrF0LbuaO7tb6it105pvGv/h2AY=" public-key=\
"8C5Kz1OZklTqIhJSdA/+Bvz7pSUJYmStXQAjvITuHXQ="