Score:0

Allow non-vpn connections to sever which is in vpn

us flag

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
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.