One of my kids lives in a building that is wired with Internet using CGNAT (Carrier-grade NAT). I am guessing the IPFire device will work fine except for VPN (like IPsec).
I am wondering how other CGNAT homes/businnesses have gotten VPN to work. Is it possible?
I’ve searched the ISP web-site and there is nothing mentioned about requesting non-CGNAT or even a static IP address. They seem like a small company…
EDIT:
Incase this is not clear, I am trying to access the Kid IPFire box via the Internet via IPSec VPN
From what I have read it looks like the only option, other than asking for a non-CGNAT connection, is to make a connection to an external VPN server, so that IPFire is the client.
That could be done either with a commercial VPN provider or you could set up a hosted machine at an external hosting company that gets a VPN server installed on it. That machine then acts as the VPN server with IPFire as the VPN client.
Neither is an easy option but those are what I found mentioned as how to overcome the CGNAT issue for VPN connections.
@Jon I recently thought to solve a similar problem using SSH instead of VPN, having the tunnel established from inside of the CGNAT network.
I am planning to use a ssh port forward, to open a tunnel forwarding the wui of a fritzbox of family member behind a CGNAT. This scheme requires an intermediate server with a publicly available IP.
The plan is the following (here I use IPFire WUI as the target instead of a fritzbox):
from IPFire, run a ssh command to connect to my intermediate server, forwarding port 444 to port 8444
now I can point my browser to https://localhost:8444 and trough the two halves of the tunnel, I can reach the WUI behind the CGNAT.
The only problem I can anticipate is when the SSH connection from the target network is broken off by an IP change. In this case a script called auto_ssh.sh will probe the ssh connection every 10 min and restart it when it gets broken:
auto_ssh.sh:
#!/bin/sh
REMOTE_USER=user
REMOTE_HOST=intermediate-server
KEY_PATH=/path/to/your/private_key
REMOTE_PORT=8444
LOCAL_PORT=444
# Check if the SSH tunnel is up
nc -z -w 5 localhost $LOCAL_PORT
# If the tunnel is down, reconnect
if [ $? -ne 0 ]; then
ssh -i $KEY_PATH -R $REMOTE_PORT:localhost:$LOCAL_PORT -N -f $REMOTE_USER@$REMOTE_HOST
fi