Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to get internet access. #141

Closed
pvanthony opened this issue Apr 11, 2024 · 4 comments
Closed

Unable to get internet access. #141

pvanthony opened this issue Apr 11, 2024 · 4 comments

Comments

@pvanthony
Copy link

pvanthony commented Apr 11, 2024

Did the install on a fresh and clean Debian 12.
Took the config and placed it in fedora 39 as /etc/wireguard/wg0.conf
Did sudo systemctl stop wg-quick@wg0
Can ping wireguard server at 10.7.0.1
From the wireguard server can ping 10.7.0.2
But cannot ping 8.8.8.8 or any other public ip address.
The wireguard server ip address is 10.0.0.168
But cannot ping the router in the office at 10.0.0.1 through wireguard.
From within wireguard server, I can ping 10.0.0.1 and can get to the internet.

I am able to login into the wireguard server like ssh [email protected]
Wireguard seems to be working but can only go to 10.7.0.*

I need to be able to get to the other servers in the office which are in 10.0.0.*
Also need to access internet through the office router.

What am I missing? Should I need to do some routing table?
I am not an linux expert but willing to try and learn.

@KaeTuuN
Copy link

KaeTuuN commented Apr 11, 2024

It sounds like your local Network does have the same IP-Address Pool, then the Wireguard Network!?
If YES: That's not possible!
Option 1) Change the Address Pool in your local network
Option 2) Change the Address Pool in your Wireguard network

If NO: Please add some more Information

  • Interfaces & Addresses from your Wiregeuard Server
  • Interfaces & Addresses from your Client

@pvanthony
Copy link
Author

pvanthony commented Apr 11, 2024

It sounds like your local Network does have the same IP-Address Pool, then the Wireguard Network!? If YES: That's not possible!

Yes.
The wireguard network interface is 10.7.0.1
The physical network card is 10.0.0.168
The router is 10.0.0.1

Option 1) Change the Address Pool in your local network

Do you mean change the wg0 in my laptop at /etc/wireguard/wg0.conf?
[Interface]
Address = 10.7.0.2/24 --> change to 10.0.0.100/24
DNS = 8.8.8.8, 1.1.1.2, 1.0.0.2, 9.9.9.9
PrivateKey = private key

[Peer]
PublicKey = public key
PresharedKey = presharekey
AllowedIPs = 0.0.0.0/0, ::/0
Endpoint = wireguard_server:51820
PersistentKeepalive = 25

Option 2) Change the Address Pool in your Wireguard network

Is this an option or need to change at the wireguard server as well?

@pvanthony
Copy link
Author

Please ignore this issue. The error is on my end. It is fixed now.

@pvanthony
Copy link
Author

Here is what happened.
The wireguard server was installed in a small pc at my home.
Then I moved the the pc to the office. The pc was on dhcp.
So the ip address changed when it was in the office.
The install script also setup the firewall during the initial installation where the ip address was my home ip address.

So when the pc was moved to the office with the different ip address, the firewall was still set to my home ip address.

Changed the firewall script in the wireguard server with the ip address of the pc in the office and all is good.
All working now.

Sorry for the noise.

@Nyr Nyr closed this as completed Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants