I have an ubuntu 22.04 server in Oracle Cloud. It works as vpn server with wireguard onboarded (using Algo). I also have couple of ubuntu 22.04 server clients which also have wireguard and thus create one vpn network.
I dont have any issues while connecting from clients to server as well dont have any speed problems.
My concern is following, how would I allow ssh connection to clients when they are in vpn? I am able to do ssh only to vpn IPs (e.g. 10.49.0.7) and public IPs dont work anymore.
Client ifconfig:
ens3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 9000
inet 10.0.0.144 netmask 255.255.255.0 broadcast 10.0.0.255
inet6 fe80::18ff:fe18:a992 prefixlen 64 scopeid 0x20<link>
ether 03:01:18:18:a9:92 txqueuelen 1000 (Ethernet)
RX packets 3884 bytes 674750 (674.7 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 4007 bytes 421313 (421.3 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wg0: flags=209<UP,POINTOPOINT,RUNNING,NOARP> mtu 8920
inet 10.49.0.7 netmask 255.255.255.255 destination 10.49.0.7
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 1000 (UNSPEC)
RX packets 606 bytes 219172 (219.1 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 765 bytes 216156 (216.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Client wg0.conf:
[Interface]
PrivateKey = xyz=
Address = 10.49.0.7
DNS = x.y.z.x
[Peer]
PublicKey = xyz=
PresharedKey = xyz=
AllowedIPs = 0.0.0.0/0
Endpoint = x.y.z.y:51820