1]
Kód: Vybrat vše
/interface/wireguard/add private-key="muj-privatni-klic=" name=wg-odorik
Kód: Vybrat vše
/interface/wireguard/peers/add allowed-address=81.31.43.192/28,81.31.43.232/29,81.31.45.32/27,89.185.255.32/28,89.185.255.48/29,89.185.255.56/32,89.185.255.58/31,89.185.255.60/30,172.16.0.0/16 \
endpoint-address=89.185.255.57 \
endpoint-port=38150 \
interface=wg-odorik \
public-key="Odor8VaaxS9YIdZv6xGcuibSccYRFVWk7ctTGSp43C8=" \
persistent-keepalive=30
Kód: Vybrat vše
/ip/address/add address=172.16.xx.xx/xx network=???.??.?.?/?? interface=wg-odorik
4]
Kód: Vybrat vše
/routing/table/add name=wg-sip
/ip/firewall/mangle/add chain=prerouting in-interface=wg-sip action=mark-routing new-routing-mark=wg-sip
Kód: Vybrat vše
/routing/rule/add routing-mark=wg-sip action=lookup-only-in-table table=wg-sip
/ip/route/add dst-address=0.0.0.0/0 gateway=???.??.?.?/?? routing-table=wg-sip
Kód: Vybrat vše
/ip/firewall/nat/add chain=srcnat out-interface=wg-odorik action=masquerade
Kdyz se na to ted divam, nemnely by ty adresy na WG Interface mit "0.0.0.0/0"
a v bode (5) se ty adresy pridaji, protoze pres to WG "wg-odorik" interface, chci routovat jen Vas traffic a ne vsechno .....
ale mikrotik preci potrebuje vedet (z routing table) ze to pro ty vase rozsahy IP address ma smerovat na to "wg-odorik" interface ..