VPN: Network to Host to Internet

David McKenzie krisp at krisp.com
Tue Aug 12 11:08:21 PDT 2003


Hello,

I have two freebsd boxes running 5.0 with IPSec enabled and racoon 
installed. This is what I am trying to do:

| internal |  -------> [FreeBSD gateway] ----> (internet) -----> 
[FreeBSD host] -------> internet

I'd like to encapsulate all IP traffic from my internal network at my 
apartment (192.168.1.0/24) through my cable modem to a FreeBSD box at 
school, and then off to the internet. I don't want any traffic to go 
directly to the internet -- I'd like to use IPsec to encrypt all 
traffic to the host at school before reaching the internet.

At this time, I'm not concerned with using Racoon for IKE, as I haven't 
had much luck getting it to work in the past. I am willing to use 
static keys for the time being using the 'setkey' command, but I'm not 
sure how to set everything up as the only documentation I can find is 
host to host or network to network, but not network to host to internet.

Has anyone implemented IPsec in this fashion? Some pointers to 
documentation I may have missed would be appreciated, as well as some 
explanation on how to set up the tunnels and routes to make this 
scenario a reality.

Thanks,
David



More information about the freebsd-questions mailing list