testing: Added swanctl/shunt-policies-nat-rw

This commit is contained in:
Andreas Steffen
2016-02-28 22:25:50 +01:00
parent 13891e2a4f
commit efefa0c6a1
12 changed files with 231 additions and 0 deletions
@@ -0,0 +1,11 @@
# /etc/strongswan.conf - strongSwan configuration file
charon {
load = random nonce aes sha1 sha2 pem pkcs1 gmp x509 curl revocation hmac vici kernel-netlink socket-default updown
start-scripts {
creds = /usr/local/sbin/swanctl --load-creds
conns = /usr/local/sbin/swanctl --load-conns
}
keep_alive = 5
}
@@ -0,0 +1,40 @@
connections {
nat-t {
remote_addrs = 192.168.0.2
vips = 0.0.0.0
local {
auth = pubkey
certs = aliceCert.pem
id = [email protected]
}
remote {
auth = pubkey
id = sun.strongswan.org
}
children {
nat-t {
remote_ts = 0.0.0.0/0
updown = /usr/local/libexec/ipsec/_updown iptables
esp_proposals = aes128gcm128-modp3072
}
}
version = 2
proposals = aes128-sha256-modp3072
}
local-net {
children {
local-net {
local_ts = 10.1.0.0/16
remote_ts = 10.1.0.0/16
mode = pass
start_action = trap
}
}
}
}
@@ -0,0 +1,24 @@
*filter
# default policy is DROP
-P INPUT DROP
-P OUTPUT DROP
-P FORWARD DROP
# allow IKE
-A INPUT -i eth0 -p udp --dport 500 -j ACCEPT
-A OUTPUT -o eth0 -p udp --sport 500 -j ACCEPT
# allow MobIKE
-A INPUT -i eth0 -p udp --dport 4500 -j ACCEPT
-A OUTPUT -o eth0 -p udp --sport 4500 -j ACCEPT
# allow ssh
-A INPUT -p tcp --dport 22 -j ACCEPT
-A OUTPUT -p tcp --sport 22 -j ACCEPT
# allow crl fetch from winnetou
-A INPUT -i eth0 -p tcp --sport 80 -s PH_IP_WINNETOU -j ACCEPT
-A OUTPUT -o eth0 -p tcp --dport 80 -d PH_IP_WINNETOU -j ACCEPT
COMMIT
@@ -0,0 +1,11 @@
# /etc/strongswan.conf - strongSwan configuration file
charon {
load = random nonce aes sha1 sha2 pem pkcs1 gmp x509 curl revocation hmac vici kernel-netlink socket-default updown
start-scripts {
creds = /usr/local/sbin/swanctl --load-creds
pools = /usr/local/sbin/swanctl --load-pools
conns = /usr/local/sbin/swanctl --load-conns
}
}
@@ -0,0 +1,32 @@
connections {
nat-t {
local_addrs = 192.168.0.2
pools = rw_pool
local {
auth = pubkey
certs = sunCert.pem
id = sun.strongswan.org
}
remote {
auth = pubkey
}
children {
nat-t {
local_ts = 0.0.0.0/0
updown = /usr/local/libexec/ipsec/_updown iptables
esp_proposals = aes128gcm128-modp3072
}
}
version = 2
proposals = aes128-sha256-modp3072
}
}
pools {
rw_pool {
addrs = 10.3.0.0/28
}
}
@@ -0,0 +1,11 @@
# /etc/strongswan.conf - strongSwan configuration file
charon {
load = random nonce aes sha1 sha2 pem pkcs1 gmp x509 curl revocation hmac vici kernel-netlink socket-default updown
start-scripts {
creds = /usr/local/sbin/swanctl --load-creds
conns = /usr/local/sbin/swanctl --load-conns
}
keep_alive = 5
}
@@ -0,0 +1,40 @@
connections {
nat-t {
remote_addrs = 192.168.0.2
vips = 0.0.0.0
local {
auth = pubkey
certs = venusCert.pem
id = venus.strongswan.org
}
remote {
auth = pubkey
id = sun.strongswan.org
}
children {
nat-t {
remote_ts = 0.0.0.0/0
updown = /usr/local/libexec/ipsec/_updown iptables
esp_proposals = aes128gcm128-modp3072
}
}
version = 2
proposals = aes128-sha256-modp3072
}
local-net {
children {
local-net {
local_ts = 10.1.0.0/16
remote_ts = 10.1.0.0/16
mode = pass
start_action = trap
}
}
}
}