From: "Christian Moser" <cmos@maklee.com>
To: <pve-devel@lists.proxmox.com>
Cc: Christian Moser <cmos@maklee.com>
Subject: [pve-devel] Unable to connect from Guest VM running on Proxmox to connect to internet via wireguard
Date: Sat, 19 Oct 2024 10:35:24 +0300 [thread overview]
Message-ID: <009e01db21f9$77ade520$6709af60$@maklee.com> (raw)
Hello,
I have setup wireguard on my Proxmox KVM host system and I have verified the connectivity to the remote internet node (10.10.100.9
in my case). This is working fine.
But I fail to setup a network interface on the Guest VM to allow to connect from the Guest VM to this 10.10.100.9 node.
I have spent a lot of time reading through articles and I have tried setting up interfaces, bridges, port-forwaring etc., but no
luck.
Below is the wireguard info from the KVM host (which has address 192.168.32.70)
Any thoughts? any help or pointers?
thanks very much
/cmos
root@cmos04:~# systemctl status wg-quick@wg0.service
? wg-quick@wg0.service - WireGuard via wg-quick(8) for wg0
Loaded: loaded (/lib/systemd/system/wg-quick@.service; enabled; preset: enabled)
Active: active (exited) since Sat 2024-10-19 10:24:41 EEST; 1min 30s ago
Docs: man:wg-quick(8)
man:wg(8)
https://www.wireguard.com/
https://www.wireguard.com/quickstart/
https://git.zx2c4.com/wireguard-tools/about/src/man/wg-quick.8
https://git.zx2c4.com/wireguard-tools/about/src/man/wg.8
Process: 943 ExecStart=/usr/bin/wg-quick up wg0 (code=exited, status=0/SUCCESS)
Main PID: 943 (code=exited, status=0/SUCCESS)
CPU: 92ms
Oct 19 10:24:41 cmos04 wg-quick[991]: [#] resolvconf -a wg0 -m 0 -x
Oct 19 10:24:41 cmos04 wg-quick[943]: [#] ip -4 route add 192.168.100.0/24 dev wg0
Oct 19 10:24:41 cmos04 wg-quick[943]: [#] ip -4 route add 172.27.224.0/24 dev wg0
Oct 19 10:24:41 cmos04 wg-quick[943]: [#] ip -4 route add 172.31.0.0/16 dev wg0
Oct 19 10:24:41 cmos04 wg-quick[943]: [#] ip -4 route add 172.30.0.0/16 dev wg0
Oct 19 10:24:41 cmos04 wg-quick[943]: [#] ip -4 route add 172.20.0.0/16 dev wg0
Oct 19 10:24:41 cmos04 wg-quick[943]: [#] ip -4 route add 172.16.0.0/16 dev wg0
Oct 19 10:24:41 cmos04 wg-quick[943]: [#] ip -4 route add 10.11.0.0/16 dev wg0
Oct 19 10:24:41 cmos04 wg-quick[943]: [#] ip -4 route add 10.10.0.0/16 dev wg0
Oct 19 10:24:41 cmos04 systemd[1]: Finished wg-quick@wg0.service - WireGuard via wg-quick(8) for wg0.
root@cmos04:~# wg show
interface: wg0
public key: 4OWslSpjJXX7tHMHw6IQ/tHG+mjIyd+dfC9xLIfzsG4=
private key: (hidden)
listening port: 59096
peer: X9C7S5N5leYM40lCvKNbQ4URDuK0ZU1+m0HcTvZHPgM=
preshared key: (hidden)
endpoint: 148.51.229.45:51820
allowed ips: 172.30.0.0/16, 172.31.0.0/16, 10.10.0.0/16, 10.11.0.0/16, 172.16.0.0/16, 172.20.0.0/16, 172.27.224.0/24,
192.168.100.0/24
latest handshake: 1 minute, 34 seconds ago
transfer: 1.14 KiB received, 1.62 KiB sent
persistent keepalive: every 25 seconds
root@cmos04:~# telnet 10.10.100.9
Trying 10.10.100.9...
Connected to 10.10.100.9.
Escape character is '^]'.
LOBSTA (XVMS) (HP rx2800 i4 (2.13GHz/24.0MB))
Unauthorized access prohibited.
Username: *EXIT*
Error reading command input
Connection closed by foreign host.
root@cmos04:~#
root@cmos04:~# cat /etc/network/interfaces
auto lo
iface lo inet loopback
iface enp3s0 inet manual
auto vmbr0
iface vmbr0 inet static
address 192.168.32.70/24
gateway 192.168.32.1
bridge-ports enp3s0
bridge-stp off
bridge-fd 0
iface wlo1 inet manual
source /etc/network/interfaces.d/*
root@cmos04:~#
_______________________________________________________
Christian Moser
Mobile: +358-40-5022105
Email: cmos@maklee.com
URL: www.maklee.com
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next reply other threads:[~2024-10-23 9:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-19 7:35 Christian Moser [this message]
2024-10-23 10:04 ` Andreas Steinel via pve-devel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='009e01db21f9$77ade520$6709af60$@maklee.com' \
--to=cmos@maklee.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal