IPSec tunnel between my office and the cloud


My purpose is tunneling my office with the cloud utilizing ipsec. I will provision a gateway machine in the cloud running openswan, in my office I am using pfsense.

In my cloud gateway vm image:

[root@gtw ~]#yum install openswan (if it isn't already)
[root@gtw ~]#vi /etc/ipsec.d/myconn
config setup
       nat_traversal=yes
       oe=off
       protostack=netkey
       interfaces="%defaultroute"
       klipsdebug=all
       plutodebug=all
conn myconn
   authby=secret
   pfs=yes
   auto=start
   ike=3des-sha1
   esp=3des-sha1
   keyingtries=30
   rekey=no
   ikelifetime=24h
   keylife=1h
   type=tunnel
   left=<gateway private address>
   leftsubnet=10.0.1.0/24
   right=<my office public ip(nated)>
   rightsubnets=10.0.0.0/24 

[root@gtw ~]# vi /etc/ipsec.d/shared.secrets
%any %any : PSK "<yoursecret>"

[root@gtw ~]# service ipsec start
ipsec_setup: Starting Openswan IPsec U2.6.32/K3.8.13-68.2.2.2.el6uek.x86_64...
ipsec_setup: /usr/libexec/ipsec/addconn Non-fips mode set in /proc/sys/crypto/fips_enabled
[root@gtw ~]# service ipsec status
IPsec running  - pluto pid: 4893
pluto pid 4893
1 tunnels up
some eroutes exist

In my local firewall:

This slideshow requires JavaScript.

Troubleshooting:

A

B

C

Useful tools:

Oracle Public Cloud

pfsense

Enjoy 😉

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.