LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-13-2022, 09:30 AM   #1
sewe
LQ Newbie
 
Registered: Oct 2022
Posts: 1

Rep: Reputation: 0
Routing all traffic through AlmaLinux WireGuard server doesn't work


Hello everyone!
I have an Alma Linux 9 VPS instance at Contabo running Wireguard. Starting Wireguard daemon using systemD works as expected. Here's my /etc/wireguard/wg0.conf file:
Code:
[Interface]
Address = 192.0.2.1/24
ListenPort = 51820
PrivateKey = [Here's my server's private key]

[Peer]
PublicKey = [Here's my clients public key]
AllowedIPs = 192.0.2.2/24
PersistentKeepalive = 25
And here's the output of firewall-cmd --list-all:
Code:
public (active)
  target: default
  icmp-block-inversion: no
  interfaces: eth0
  sources:
  services: cockpit dhcpv6-client http https
  ports: 55555/tcp 51820/udp
  protocols:
  forward: yes
  masquerade: yes
  forward-ports:
  source-ports:
  icmp-blocks:
  rich rules:
My client is desktop Arch Linux behind standard NAT (home router). Client's wireguard configuration file:
Code:
[Interface]
PrivateKey = [My client's private key]
Address = 192.0.2.2/24


[Peer]
PublicKey = [My server's public key]
Endpoint = [server's public IP]:51820
AllowedIPs = 0.0.0.0/0
PersistentKeepAlive = 25
The problem is when I connect to the server through WireGuard my ssh connection breaks and I can't access the internet (both using IP addresses and domain names). I think my IP and routing configuration may cause the issue. When I enabled wireguard debugging I noticed some messages like that:
Code:
[153961.338747] wireguard: wg0: Packet has unallowed src IP (192.168.0.106) from peer 15 ([My client's public IP]:56050)
This 192.168.0.106 address is my client's private IP at home. I don't know too much about networking, so please be patient.
Thank you all in advance.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] complex routing problem using ssh with Wireguard and iptables pisti Linux - Networking 5 03-16-2022 11:29 AM
Routing all internet traffic through a proxy dnoy Linux - Newbie 24 02-08-2022 11:56 AM
LXer: AlmaLinux Announces ‘ELevate’ For CentOS 7 to AlmaLinux 8 Migrations LXer Syndicated Linux News 0 10-20-2021 05:37 AM
LXer: Migrate To AlmaLinux From CentOS 8 Using Almalinux-deploy Script LXer Syndicated Linux News 0 02-17-2021 05:30 AM
Routing all traffic to internet through a linux box firewiz87 Linux - Networking 2 10-06-2010 04:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration