Nyr / wireguard-install

WireGuard road warrior installer for Ubuntu, Debian, AlmaLinux, Rocky Linux, CentOS and Fedora

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to get internet access.

pvanthony opened this issue · comments

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 name@10.7.0.1
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.

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

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?

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

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.