Community discussions

MikroTik App
 
User avatar
Techsystem
Member
Member
Topic Author
Posts: 337
Joined: Tue Dec 21, 2021 5:12 am

No internet connection when i establish a connection with Wireguard from my windows machine side

Thu Sep 08, 2022 11:44 pm

Hello my friends..! So i setup my wireguard on my router normaly and also on my Windows machine,
However. When i establish a connection the connection work fine and i can ping my router and all devises on my network. Yet i dont have Internet access in my pc that running windows. So what may cause such this issue...?
this isy config
on my router

Wireguard interface
Name:wireguard
MTU:1420
Listen port 47111
Private key:......
Public key:... buj0jwhgs.... Etc

Wireguard peer
Interface:Wireguard
Public key:TRJ+zGkjsj.. Etc
Allowed address:172.22.0.2/32

Also i created an ip address for wireguard as below
Ip-address-172.22.0.1/24 interface=wireguard

I dont have any firwall rule now

on my windows machine

Interface =wg0
Public key=TRJ+zGkj... Etc
Address=172.22.0.2
Dns server:1.1.1.1

Peer
Public key:buj0....
Allowed IPs:0.0.0.0/0
Endpoint:my public ip address on my router
Persistent keepalive:25
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19109
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: No internet connection when i establish a connection with Wireguard from my windows machine side

Fri Sep 09, 2022 5:16 am

Two thoughts,
a. try dns server as the IP address of the wireguard address on the router (as per the MT wireguard youtube video).
b. What are your IP routes on the mikrotik router.
 
User avatar
Techsystem
Member
Member
Topic Author
Posts: 337
Joined: Tue Dec 21, 2021 5:12 am

Re: No internet connection when i establish a connection with Wireguard from my windows machine side

Fri Sep 09, 2022 6:53 am

Two thoughts,
a. try dns server as the IP address of the wireguard address on the router (as per the MT wireguard youtube video).
b. What are your IP routes on the mikrotik router.
hello again Mr anav ..!
the first method didn't work.
2-see the picture below: this is my ip address and routing table.
You do not have the required permissions to view the files attached to this post.
 
User avatar
Techsystem
Member
Member
Topic Author
Posts: 337
Joined: Tue Dec 21, 2021 5:12 am

Re: No internet connection when i establish a connection with Wireguard from my windows machine side

Fri Sep 09, 2022 11:08 am

hello again my friends ..! so i solved the internet connection problem, i just change the allow address to contain only my wireguard and local LAN ip address -like the picture below-. and in this case i get internet connection and access to my local network through wireguard.however, when i try to connect to my remote desktop, i put the local ip address of my remote pc on the menu then i put the login credential normal and enter to my remote pc but with no view . so the screen is black, so is this related to a bandwidth limit that the wiregurad allow to use ..?. or may some other problem again..?
anyone encounter such a behavior before..?
You do not have the required permissions to view the files attached to this post.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19109
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: No internet connection when i establish a connection with Wireguard from my windows machine side

Fri Sep 09, 2022 1:02 pm

Okay so you have a private IP on the mikrotik.
Im assuming you have an ISP modem router of some sort before the mIKROTIK and you are forwarding the wireguard port to 192.168.2.2 (the likely wan IP of the mikrotik)

Post the entire mikrotik config for further assistance.
/export ( minus serial number of mt )

YOu will not have access to the internet through the MT from your windows unless you use 0.0.0.0/0 as an allowed IP address on the windows device for allowed addresses.
Do you not understand how wireguard works??
 
User avatar
Techsystem
Member
Member
Topic Author
Posts: 337
Joined: Tue Dec 21, 2021 5:12 am

Re: No internet connection when i establish a connection with Wireguard from my windows machine side

Fri Sep 09, 2022 5:23 pm

Okay so you have a private IP on the mikrotik.
Im assuming you have an ISP modem router of some sort before the mIKROTIK and you are forwarding the wireguard port to 192.168.2.2 (the likely wan IP of the mikrotik)

Post the entire mikrotik config for further assistance.
/export ( minus serial number of mt )
see the attached file

YOu will not have access to the internet through the MT from your windows unless you use 0.0.0.0/0 as an allowed IP address on the windows device for allowed addresses.
Do you not understand how wireguard works??
sorry but what you mean by that...? so you ask me if i know how wireguard work..?
Last edited by Techsystem on Sat Sep 10, 2022 7:04 am, edited 1 time in total.
 
User avatar
Techsystem
Member
Member
Topic Author
Posts: 337
Joined: Tue Dec 21, 2021 5:12 am

Re: No internet connection when i establish a connection with Wireguard from my windows machine side  [SOLVED]

Fri Sep 09, 2022 8:35 pm

hello for all my friends there ..!
so the problem solved for the wireguard, thanks for every single replay here..
i appreciate all.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19109
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: No internet connection when i establish a connection with Wireguard from my windows machine side

Fri Sep 09, 2022 10:00 pm

How so? What did you change??

The most important I could find on the latest config is your wireguard initial connection on the MT router would not be possible if this rule is disabled.
Also did you ever confirm that your ISP router,, the one before the MT device, has port forwarding selected to the wanip of the MT router.

add action=accept chain=input comment="allow WireGuard" disabled=yes \
dst-port=13231 protocol=udp
 
User avatar
Techsystem
Member
Member
Topic Author
Posts: 337
Joined: Tue Dec 21, 2021 5:12 am

Re: No internet connection when i establish a connection with Wireguard from my windows machine side

Fri Sep 09, 2022 11:08 pm

How so? What did you change??
so it's all about MTU, i keep changing MTU in peer side until i get the proper connection that's i want
The most important I could find on the latest config is your wireguard initial connection on the MT router would not be possible if this rule is disabled.
Also did you ever confirm that your ISP router,, the one before the MT device, has port forwarding selected to the wanip of the MT router.
no no the natting -forwarding- rule doesn't related, i have an active connection with both side without any natting rule that allow the port that you mention to it
add action=accept chain=input comment="allow WireGuard" disabled=yes \
dst-port=13231 protocol=udp
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19109
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: No internet connection when i establish a connection with Wireguard from my windows machine side

Fri Sep 09, 2022 11:18 pm

No worries, I dont have a clue what you are doing now LOL, but if it works for you great!! Glad you resolved it.
 
User avatar
Techsystem
Member
Member
Topic Author
Posts: 337
Joined: Tue Dec 21, 2021 5:12 am

Re: No internet connection when i establish a connection with Wireguard from my windows machine side

Sat Sep 10, 2022 7:05 am

No worries, I dont have a clue what you are doing now LOL, but if it works for you great!! Glad you resolved it.
thanks anav..! my regards..!

Who is online

Users browsing this forum: GoogleOther [Bot], h1ghrise and 77 guests