Community discussions

MikroTik App
 
nik96i
just joined
Topic Author
Posts: 1
Joined: Fri Apr 08, 2022 10:02 am

Move Wireguard Client To RouterOS

Fri Apr 08, 2022 10:53 am

Hi, I have an LHG XL HP5 antenna with a PPPOE connection and a DHCP server. here are my configurations:
# apr/08/2022 12:12:47 by RouterOS 7.1.4
# software id = 0ZSI-VRHV
#
# model = RouterBOARD LHG 5HPnD-XL
# serial number = C6E70B583BB4
/interface wireless
set [ find default-name=wlan1 ] band=5ghz-a/n country="united states" \
    disabled=no frequency=5785 mode=station-wds ssid=Nik.P2P
/interface pppoe-client
add add-default-route=yes disabled=no interface=wlan1 name=pppoe-out1 \
    use-peer-dns=yes user=my_pppoe_username
/interface list
add name=WAN
add name=LAN
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=dhcp ranges=192.168.7.2-192.168.7.100
/ip dhcp-server
add address-pool=dhcp interface=ether1 name=dhcp1
/ip neighbor discovery-settings
set discover-interface-list=!dynamic
/ipv6 settings
set disable-ipv6=yes
/interface list member
add interface=pppoe-out1 list=WAN
add list=LAN
/ip address
add address=192.168.7.1/24 interface=ether1 network=192.168.7.0
/ip dhcp-server network
add address=192.168.7.0/24 gateway=192.168.7.1 netmask=24
/ip firewall nat
add action=masquerade chain=srcnat out-interface-list=WAN
I connected the LHG directly to my PC. now my local IP is 192.168.7.100. I use a wireguard client VPN on my PC to connect to my VPS and secure my connection:
[Interface]
PrivateKey = XXXXXXXXXXXXXXXXXXXX
Address = 10.49.0.2/32
DNS = 8.8.8.8,1.1.1.1

[Peer]
PublicKey = XXXXXXXXXXXXXXXXXXXX
PresharedKey = XXXXXXXXXXXXXXXXXXXX
AllowedIPs = 0.0.0.0/0, ::/0
Endpoint = X.X.X.X:51820
Now, I want to set up this VPN on RouterOS. I want to forward all public traffic through wireguard like what I've done with wireguard windows. can you help me?
I searched a lot in this forum, I configured Wireguard peer and had ping to 10.49.0.1 from wireguard interface but can't route/forward my PC's traffic through it. thanks.

Who is online

Users browsing this forum: EmuAGR, ppawe, TheCat12, truefriendcz and 76 guests