So I have a linux server sitting inside of a starlink network (no Public IP, hence wireguard tunnel) that I want to ssh into. I currently have a raspi sitting in my home network with a static IP (100.100.100.100) that is acting as a wireguard host server that I (attempted) to set up to route traffic from my laptop (10.10.10.3) to the linux server in the starlink network. This issue I am having is that I can successfully ping both the host server (10.10.10.1) and the linux cient inside the starlink network (10.10.10.2) but I can’t ssh directly into the linux client. I can ssh into the host server (10.10.10.1) then into the starlink network client (10.10.10.2) however I would like to not have to do two sshs everytime I have to access this device.
Is there something here I am missing? I have enabled ufw and allowed ssh and 51820/upd (not actual port), started the system in systemd, and changed the sysctl.conf to allow ipv4 & ipv6 forwarding. Any advice here would be incredibly appreciated as I am extremely a novice on VPN usage and work has delegated a lot of this stuff to me as we don’t have the resources for a proper IT person to do this stuff. Here are the wg.conf files:
wireguard vpn server:
[Interface]
Address = 10.10.10.1
ListenPort = 51820
PrivateKey = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Network Routing
PreUp = sysctl -w net.ipv4.ip_forward=1
PreUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
[Peer]
#Starlink Client
PublicKey = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
AllowedIPs = 10.10.10.2/32
[Peer]
#Laptop
PublicKey = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
AllowedIPs = 10.10.10.3/32
Starlink client:
[Interface]
Address = 10.10.10.2
PrivateKey = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
[Peer]
#WireGuard VPN Server
PublicKey = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Endpoint = 100.100.100.100:51820
PersistentKeepalive = 25
AllowedIPs = 10.10.10.0/24
Laptop:
[Interface]
Address = 10.10.10.3
ListenPort = 51820
PrivateKey = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
[Peer]
#WireGuard VPN Server
PublicKey = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Endpoint = 100.100.100.100:51820
PersistentKeepalive = 25
AllowedIPs = 10.10.10.0/24
Thank you in advance for your help! New to posting here and don’t know how bounties work but anyone giving me info leading to the solution I’d be happy to venmo you for a cup of coffee!
Keane Flynn is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.