Remote device → [VPN tunnel] → Internal resources (192.168.1.0/24)
Remote device → [Direct internet] → Web browsing (no gateway inspection)
Remote device → [VPN tunnel] → Internal resources (192.168.1.0/24)
Remote device → [Direct internet] → Web browsing (no gateway inspection)
Remote device → [VPN tunnel] → Internal resources (192.168.1.0/24)
Remote device → [Direct internet] → Web browsing (no gateway inspection)
Remote device → [VPN tunnel] → Gateway → Web browsing (gateway inspection)
Remote device → [VPN tunnel] → Gateway → Internal resources
Remote device → [VPN tunnel] → Gateway → Web browsing (gateway inspection)
Remote device → [VPN tunnel] → Gateway → Internal resources
Remote device → [VPN tunnel] → Gateway → Web browsing (gateway inspection)
Remote device → [VPN tunnel] → Gateway → Internal resources
# /etc/ipsec.conf
conn remote-workers keyexchange=ikev2 left=%any [email protected] leftcert=server.crt leftsendcert=always leftsubnet=0.0.0.0/0 # ← Full tunnel: route ALL traffic through VPN leftfirewall=yes right=%any rightauth=pubkey rightsourceip=10.8.0.0/24 # Virtual IP pool for remote workers rightdns=10.8.0.1 # Internal DNS resolver ike=aes256-sha256-ecp256! esp=aes256-sha256! dpdaction=restart dpddelay=30s auto=add
# /etc/ipsec.conf
conn remote-workers keyexchange=ikev2 left=%any [email protected] leftcert=server.crt leftsendcert=always leftsubnet=0.0.0.0/0 # ← Full tunnel: route ALL traffic through VPN leftfirewall=yes right=%any rightauth=pubkey rightsourceip=10.8.0.0/24 # Virtual IP pool for remote workers rightdns=10.8.0.1 # Internal DNS resolver ike=aes256-sha256-ecp256! esp=aes256-sha256! dpdaction=restart dpddelay=30s auto=add
# /etc/ipsec.conf
conn remote-workers keyexchange=ikev2 left=%any [email protected] leftcert=server.crt leftsendcert=always leftsubnet=0.0.0.0/0 # ← Full tunnel: route ALL traffic through VPN leftfirewall=yes right=%any rightauth=pubkey rightsourceip=10.8.0.0/24 # Virtual IP pool for remote workers rightdns=10.8.0.1 # Internal DNS resolver ike=aes256-sha256-ecp256! esp=aes256-sha256! dpdaction=restart dpddelay=30s auto=add
leftsubnet=0.0.0.0/0
TSi (initiator): 0.0.0.0/0 (all traffic from client)
TSr (responder): 0.0.0.0/0 (to anywhere)
TSi (initiator): 0.0.0.0/0 (all traffic from client)
TSr (responder): 0.0.0.0/0 (to anywhere)
TSi (initiator): 0.0.0.0/0 (all traffic from client)
TSr (responder): 0.0.0.0/0 (to anywhere)
default via 10.8.0.1 dev tun0 # All internet traffic → VPN tunnel
10.8.0.0/24 via tun0 # VPN subnet direct
192.168.1.0/24 via tun0 # Internal LAN
default via 10.8.0.1 dev tun0 # All internet traffic → VPN tunnel
10.8.0.0/24 via tun0 # VPN subnet direct
192.168.1.0/24 via tun0 # Internal LAN
default via 10.8.0.1 dev tun0 # All internet traffic → VPN tunnel
10.8.0.0/24 via tun0 # VPN subnet direct
192.168.1.0/24 via tun0 # Internal LAN
# Enable IP forwarding
echo 1 > /proc/sys/net/ipv4/ip_forward # NAT VPN traffic to external interface
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE # Redirect VPN client HTTP through proxy (same as LAN clients)
iptables -t nat -A PREROUTING -s 10.8.0.0/24 -p tcp --dport 80 -j REDIRECT --to-port 3128 # VPN clients subject to same FORWARD rules as LAN clients
iptables -A FORWARD -s 10.8.0.0/24 -j ACCEPT
# Enable IP forwarding
echo 1 > /proc/sys/net/ipv4/ip_forward # NAT VPN traffic to external interface
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE # Redirect VPN client HTTP through proxy (same as LAN clients)
iptables -t nat -A PREROUTING -s 10.8.0.0/24 -p tcp --dport 80 -j REDIRECT --to-port 3128 # VPN clients subject to same FORWARD rules as LAN clients
iptables -A FORWARD -s 10.8.0.0/24 -j ACCEPT
# Enable IP forwarding
echo 1 > /proc/sys/net/ipv4/ip_forward # NAT VPN traffic to external interface
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE # Redirect VPN client HTTP through proxy (same as LAN clients)
iptables -t nat -A PREROUTING -s 10.8.0.0/24 -p tcp --dport 80 -j REDIRECT --to-port 3128 # VPN clients subject to same FORWARD rules as LAN clients
iptables -A FORWARD -s 10.8.0.0/24 -j ACCEPT
<!-- mobileconfig excerpt -->
<key>VPNType</key>
<string>IKEv2</string>
<key>RemoteAddress</key>
<string>vpn.example.com</string>
<key>RemoteIdentifier</key>
<string>vpn.example.com</string>
<key>LocalIdentifier</key>
<string>[email protected]</string>
<key>PayloadCertificateUUID</key>
<string><!-- UUID of client cert payload --></string>
<!-- IPv4 routing: send all traffic through VPN -->
<key>IPv4</key>
<dict> <key>OverridePrimary</key> <integer>1</integer> <!-- Full tunnel -->
</dict>
<!-- mobileconfig excerpt -->
<key>VPNType</key>
<string>IKEv2</string>
<key>RemoteAddress</key>
<string>vpn.example.com</string>
<key>RemoteIdentifier</key>
<string>vpn.example.com</string>
<key>LocalIdentifier</key>
<string>[email protected]</string>
<key>PayloadCertificateUUID</key>
<string><!-- UUID of client cert payload --></string>
<!-- IPv4 routing: send all traffic through VPN -->
<key>IPv4</key>
<dict> <key>OverridePrimary</key> <integer>1</integer> <!-- Full tunnel -->
</dict>
<!-- mobileconfig excerpt -->
<key>VPNType</key>
<string>IKEv2</string>
<key>RemoteAddress</key>
<string>vpn.example.com</string>
<key>RemoteIdentifier</key>
<string>vpn.example.com</string>
<key>LocalIdentifier</key>
<string>[email protected]</string>
<key>PayloadCertificateUUID</key>
<string><!-- UUID of client cert payload --></string>
<!-- IPv4 routing: send all traffic through VPN -->
<key>IPv4</key>
<dict> <key>OverridePrimary</key> <integer>1</integer> <!-- Full tunnel -->
</dict>
Add-VpnConnection -Name "Work VPN" ` -ServerAddress "vpn.example.com" ` -TunnelType IKEv2 ` -AuthenticationMethod MachineCertificate ` -SplitTunneling $false # ← Full tunnel: route all traffic
Add-VpnConnection -Name "Work VPN" ` -ServerAddress "vpn.example.com" ` -TunnelType IKEv2 ` -AuthenticationMethod MachineCertificate ` -SplitTunneling $false # ← Full tunnel: route all traffic
Add-VpnConnection -Name "Work VPN" ` -ServerAddress "vpn.example.com" ` -TunnelType IKEv2 ` -AuthenticationMethod MachineCertificate ` -SplitTunneling $false # ← Full tunnel: route all traffic - Web traffic scanned by gateway antivirus (same as office)
- URL filtering applied (same categories and policies as office)
- Traffic logged at gateway (same visibility as office)
- Internal resources accessible as if on-site