upgraded ipv6 scenarios to 5.0.0
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
moon::ipsec status::host-host.*STATE_QUICK_I2.*IPsec SA established::YES
|
moon::ipsec status 2> /dev/null::net-net.*ESTABLISHED.*moon.strongswan.org.*sun.strongswan.org::YES
|
||||||
sun::ipsec status::host-host.*STATE_QUICK_R2.*IPsec SA established::YES
|
sun:: ipsec status 2> /dev/null::net-net.*ESTABLISHED.*sun.strongswan.org.*moon.strongswan.org::YES
|
||||||
|
moon::ipsec status 2> /dev/null::host-host.*INSTALLED, TUNNEL::YES
|
||||||
|
sun:: ipsec status 2> /dev/null::host-host.*INSTALLED, TUNNEL::YES
|
||||||
moon::ping6 -c 1 -p deadbeef ip6-sun.strongswan.org::64 bytes from ip6-sun.strongswan.org: icmp_seq=1::YES
|
moon::ping6 -c 1 -p deadbeef ip6-sun.strongswan.org::64 bytes from ip6-sun.strongswan.org: icmp_seq=1::YES
|
||||||
sun::tcpdump::IP6 ip6-moon.strongswan.org > ip6-sun.strongswan.org: ESP::YES
|
sun::tcpdump::IP6 ip6-moon.strongswan.org > ip6-sun.strongswan.org: ESP::YES
|
||||||
sun::tcpdump::IP6 ip6-sun.strongswan.org > ip6-moon.strongswan.org: ESP::YES
|
sun::tcpdump::IP6 ip6-sun.strongswan.org > ip6-moon.strongswan.org: ESP::YES
|
||||||
|
|||||||
@@ -45,14 +45,22 @@ start() {
|
|||||||
ip6tables -A INPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
ip6tables -A INPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
||||||
ip6tables -A OUTPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
ip6tables -A OUTPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
||||||
|
|
||||||
# allow crl fetch from winnetou
|
# allow last IPv6 UDP fragments
|
||||||
iptables -A INPUT -i eth0 -p tcp --sport 80 -s PH_IP_WINNETOU -j ACCEPT
|
ip6tables -A INPUT -p udp -m frag --fraglast -j ACCEPT
|
||||||
iptables -A OUTPUT -o eth0 -p tcp --dport 80 -d PH_IP_WINNETOU -j ACCEPT
|
ip6tables -A OUTPUT -p udp -m frag --fraglast -j ACCEPT
|
||||||
|
|
||||||
|
# allow crl and certificate fetch from winnetou
|
||||||
|
ip6tables -A INPUT -i eth0 -p tcp --sport 80 -s PH_IP6_WINNETOU -j ACCEPT
|
||||||
|
ip6tables -A OUTPUT -o eth0 -p tcp --dport 80 -d PH_IP6_WINNETOU -j ACCEPT
|
||||||
|
|
||||||
# allow ssh
|
# allow ssh
|
||||||
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
|
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
|
||||||
iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT
|
iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT
|
||||||
|
|
||||||
|
# log dropped packets
|
||||||
|
ip6tables -A INPUT -j LOG --log-prefix " IN: "
|
||||||
|
ip6tables -A OUTPUT -j LOG --log-prefix " OUT: "
|
||||||
|
|
||||||
eend $?
|
eend $?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||||
|
|
||||||
config setup
|
config setup
|
||||||
plutodebug=control
|
plutostart=no
|
||||||
crlcheckinterval=180
|
|
||||||
strictcrlpolicy=no
|
ca strongswan
|
||||||
charonstart=no
|
cacert=strongswanCert.pem
|
||||||
|
certuribase=http://ip6-winnetou.strongswan.org/certs/
|
||||||
|
crluri=http://ip6-winnetou.strongswan.org/strongswan.crl
|
||||||
|
auto=add
|
||||||
|
|
||||||
conn %default
|
conn %default
|
||||||
ikelifetime=60m
|
ikelifetime=60m
|
||||||
@@ -26,3 +29,4 @@ conn host-host
|
|||||||
right=PH_IP6_SUN
|
right=PH_IP6_SUN
|
||||||
[email protected]
|
[email protected]
|
||||||
auto=add
|
auto=add
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
# /etc/strongswan.conf - strongSwan configuration file
|
||||||
|
|
||||||
|
charon {
|
||||||
|
hash_and_url = yes
|
||||||
|
load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random nonce x509 revocation hmac stroke kernel-netlink socket-default updown
|
||||||
|
}
|
||||||
@@ -45,14 +45,22 @@ start() {
|
|||||||
ip6tables -A INPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
ip6tables -A INPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
||||||
ip6tables -A OUTPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
ip6tables -A OUTPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
||||||
|
|
||||||
# allow crl fetch from winnetou
|
# allow last IPv6 UDP fragments
|
||||||
iptables -A INPUT -i eth0 -p tcp --sport 80 -s PH_IP_WINNETOU -j ACCEPT
|
ip6tables -A INPUT -p udp -m frag --fraglast -j ACCEPT
|
||||||
iptables -A OUTPUT -o eth0 -p tcp --dport 80 -d PH_IP_WINNETOU -j ACCEPT
|
ip6tables -A OUTPUT -p udp -m frag --fraglast -j ACCEPT
|
||||||
|
|
||||||
|
# allow crl and certificate fetch from winnetou
|
||||||
|
ip6tables -A INPUT -i eth0 -p tcp --sport 80 -s PH_IP6_WINNETOU -j ACCEPT
|
||||||
|
ip6tables -A OUTPUT -o eth0 -p tcp --dport 80 -d PH_IP6_WINNETOU -j ACCEPT
|
||||||
|
|
||||||
# allow ssh
|
# allow ssh
|
||||||
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
|
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
|
||||||
iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT
|
iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT
|
||||||
|
|
||||||
|
# log dropped packets
|
||||||
|
ip6tables -A INPUT -j LOG --log-prefix " IN: "
|
||||||
|
ip6tables -A OUTPUT -j LOG --log-prefix " OUT: "
|
||||||
|
|
||||||
eend $?
|
eend $?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||||
|
|
||||||
config setup
|
config setup
|
||||||
plutodebug=control
|
plutostart=no
|
||||||
crlcheckinterval=180
|
|
||||||
strictcrlpolicy=no
|
ca strongswan
|
||||||
charonstart=no
|
cacert=strongswanCert.pem
|
||||||
|
certuribase=http://ip6-winnetou.strongswan.org/certs/
|
||||||
|
crluri=http://ip6-winnetou.strongswan.org/strongswan.crl
|
||||||
|
auto=add
|
||||||
|
|
||||||
conn %default
|
conn %default
|
||||||
ikelifetime=60m
|
ikelifetime=60m
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
# /etc/strongswan.conf - strongSwan configuration file
|
||||||
|
|
||||||
|
charon {
|
||||||
|
hash_and_url = yes
|
||||||
|
load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random nonce x509 revocation hmac stroke kernel-netlink socket-default updown
|
||||||
|
}
|
||||||
@@ -4,3 +4,4 @@ moon::ipsec start
|
|||||||
sun::ipsec start
|
sun::ipsec start
|
||||||
moon::sleep 2
|
moon::sleep 2
|
||||||
moon::ipsec up host-host
|
moon::ipsec up host-host
|
||||||
|
moon::sleep 1
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
moon::ipsec status::host-host.*INSTALLED::YES
|
moon::ipsec status 2> /dev/null::net-net.*ESTABLISHED.*moon.strongswan.org.*sun.strongswan.org::YES
|
||||||
sun::ipsec status::host-host.*INSTALLED::YES
|
sun:: ipsec status 2> /dev/null::net-net.*ESTABLISHED.*sun.strongswan.org.*moon.strongswan.org::YES
|
||||||
|
moon::ipsec status 2> /dev/null::host-host.*INSTALLED, TUNNEL::YES
|
||||||
|
sun:: ipsec status 2> /dev/null::host-host.*INSTALLED, TUNNEL::YES
|
||||||
moon::ping6 -c 1 -p deadbeef ip6-sun.strongswan.org::64 bytes from ip6-sun.strongswan.org: icmp_seq=1::YES
|
moon::ping6 -c 1 -p deadbeef ip6-sun.strongswan.org::64 bytes from ip6-sun.strongswan.org: icmp_seq=1::YES
|
||||||
sun::tcpdump::IP6 ip6-moon.strongswan.org > ip6-sun.strongswan.org: ESP::YES
|
sun::tcpdump::IP6 ip6-moon.strongswan.org > ip6-sun.strongswan.org: ESP::YES
|
||||||
sun::tcpdump::IP6 ip6-sun.strongswan.org > ip6-moon.strongswan.org: ESP::YES
|
sun::tcpdump::IP6 ip6-sun.strongswan.org > ip6-moon.strongswan.org: ESP::YES
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||||
|
|
||||||
config setup
|
config setup
|
||||||
strictcrlpolicy=no
|
|
||||||
crlcheckinterval=180
|
|
||||||
plutostart=no
|
plutostart=no
|
||||||
|
|
||||||
ca strongswan
|
ca strongswan
|
||||||
|
|||||||
@@ -2,5 +2,5 @@
|
|||||||
|
|
||||||
charon {
|
charon {
|
||||||
hash_and_url = yes
|
hash_and_url = yes
|
||||||
load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random x509 revocation hmac xcbc stroke kernel-netlink socket-default updown
|
load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random nonce x509 revocation hmac stroke kernel-netlink socket-default updown
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||||
|
|
||||||
config setup
|
config setup
|
||||||
strictcrlpolicy=no
|
|
||||||
crlcheckinterval=180
|
|
||||||
plutostart=no
|
plutostart=no
|
||||||
|
|
||||||
ca strongswan
|
ca strongswan
|
||||||
|
|||||||
@@ -2,5 +2,5 @@
|
|||||||
|
|
||||||
charon {
|
charon {
|
||||||
hash_and_url = yes
|
hash_and_url = yes
|
||||||
load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random x509 revocation hmac xcbc stroke kernel-netlink socket-default updown
|
load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random nonce x509 revocation hmac stroke kernel-netlink socket-default updown
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
moon::ipsec status::net-net.*STATE_QUICK_I2.*IPsec SA established::YES
|
moon:: ipsec status 2> /dev/null::net-net.*ESTABLISHED.*moon.strongswan.org.*sun.strongswan.org::YES
|
||||||
sun::ipsec status::net-net.*STATE_QUICK_R2.*IPsec SA established::YES
|
sun:: ipsec status 2> /dev/null::net-net.*ESTABLISHED.*sun.strongswan.org.*moon.strongswan.org::YES
|
||||||
|
moon:: ipsec status 2> /dev/null::net-net.*INSTALLED, TUNNEL::YES
|
||||||
|
sun:: ipsec status 2> /dev/null::net.net.*INSTALLED, TUNNEL::YES
|
||||||
alice::ping6 -c 1 -p deadbeef ip6-bob.strongswan.org::64 bytes from ip6-bob.strongswan.org: icmp_seq=1::YES
|
alice::ping6 -c 1 -p deadbeef ip6-bob.strongswan.org::64 bytes from ip6-bob.strongswan.org: icmp_seq=1::YES
|
||||||
sun::tcpdump::IP6 ip6-moon.strongswan.org > ip6-sun.strongswan.org: ESP::YES
|
sun::tcpdump::IP6 ip6-moon.strongswan.org > ip6-sun.strongswan.org: ESP::YES
|
||||||
sun::tcpdump::IP6 ip6-sun.strongswan.org > ip6-moon.strongswan.org: ESP::YES
|
sun::tcpdump::IP6 ip6-sun.strongswan.org > ip6-moon.strongswan.org: ESP::YES
|
||||||
|
|||||||
@@ -45,14 +45,22 @@ start() {
|
|||||||
ip6tables -A INPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
ip6tables -A INPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
||||||
ip6tables -A OUTPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
ip6tables -A OUTPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
||||||
|
|
||||||
# allow crl fetch from winnetou
|
# allow last IPv6 UDP fragments
|
||||||
iptables -A INPUT -i eth0 -p tcp --sport 80 -s PH_IP_WINNETOU -j ACCEPT
|
ip6tables -A INPUT -p udp -m frag --fraglast -j ACCEPT
|
||||||
iptables -A OUTPUT -o eth0 -p tcp --dport 80 -d PH_IP_WINNETOU -j ACCEPT
|
ip6tables -A OUTPUT -p udp -m frag --fraglast -j ACCEPT
|
||||||
|
|
||||||
|
# allow crl and certificate fetch from winnetou
|
||||||
|
ip6tables -A INPUT -i eth0 -p tcp --sport 80 -s PH_IP6_WINNETOU -j ACCEPT
|
||||||
|
ip6tables -A OUTPUT -o eth0 -p tcp --dport 80 -d PH_IP6_WINNETOU -j ACCEPT
|
||||||
|
|
||||||
# allow ssh
|
# allow ssh
|
||||||
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
|
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
|
||||||
iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT
|
iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT
|
||||||
|
|
||||||
|
# log dropped packets
|
||||||
|
ip6tables -A INPUT -j LOG --log-prefix " IN: "
|
||||||
|
ip6tables -A OUTPUT -j LOG --log-prefix " OUT: "
|
||||||
|
|
||||||
eend $?
|
eend $?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||||
|
|
||||||
config setup
|
config setup
|
||||||
plutodebug=control
|
plutostart=no
|
||||||
crlcheckinterval=180
|
|
||||||
strictcrlpolicy=no
|
ca strongswan
|
||||||
charonstart=no
|
cacert=strongswanCert.pem
|
||||||
|
certuribase=http://ip6-winnetou.strongswan.org/certs/
|
||||||
|
crluri=http://ip6-winnetou.strongswan.org/strongswan.crl
|
||||||
|
auto=add
|
||||||
|
|
||||||
conn %default
|
conn %default
|
||||||
ikelifetime=60m
|
ikelifetime=60m
|
||||||
@@ -26,4 +29,3 @@ conn host-host
|
|||||||
right=PH_IP6_SUN
|
right=PH_IP6_SUN
|
||||||
[email protected]
|
[email protected]
|
||||||
auto=add
|
auto=add
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# /etc/strongswan.conf - strongSwan configuration file
|
||||||
|
|
||||||
|
charon {
|
||||||
|
load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random nonce x509 revocation hmac stroke kernel-netlink socket-default updown
|
||||||
|
}
|
||||||
@@ -45,14 +45,22 @@ start() {
|
|||||||
ip6tables -A INPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
ip6tables -A INPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
||||||
ip6tables -A OUTPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
ip6tables -A OUTPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
||||||
|
|
||||||
# allow crl fetch from winnetou
|
# allow last IPv6 UDP fragments
|
||||||
iptables -A INPUT -i eth0 -p tcp --sport 80 -s PH_IP_WINNETOU -j ACCEPT
|
ip6tables -A INPUT -p udp -m frag --fraglast -j ACCEPT
|
||||||
iptables -A OUTPUT -o eth0 -p tcp --dport 80 -d PH_IP_WINNETOU -j ACCEPT
|
ip6tables -A OUTPUT -p udp -m frag --fraglast -j ACCEPT
|
||||||
|
|
||||||
|
# allow crl and certificate fetch from winnetou
|
||||||
|
ip6tables -A INPUT -i eth0 -p tcp --sport 80 -s PH_IP6_WINNETOU -j ACCEPT
|
||||||
|
ip6tables -A OUTPUT -o eth0 -p tcp --dport 80 -d PH_IP6_WINNETOU -j ACCEPT
|
||||||
|
|
||||||
# allow ssh
|
# allow ssh
|
||||||
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
|
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
|
||||||
iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT
|
iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT
|
||||||
|
|
||||||
|
# log dropped packets
|
||||||
|
ip6tables -A INPUT -j LOG --log-prefix " IN: "
|
||||||
|
ip6tables -A OUTPUT -j LOG --log-prefix " OUT: "
|
||||||
|
|
||||||
eend $?
|
eend $?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||||
|
|
||||||
config setup
|
config setup
|
||||||
plutodebug=control
|
plutostart=no
|
||||||
crlcheckinterval=180
|
|
||||||
strictcrlpolicy=no
|
ca strongswan
|
||||||
charonstart=no
|
cacert=strongswanCert.pem
|
||||||
|
certuribase=http://ip6-winnetou.strongswan.org/certs/
|
||||||
|
crluri=http://ip6-winnetou.strongswan.org/strongswan.crl
|
||||||
|
auto=add
|
||||||
|
|
||||||
conn %default
|
conn %default
|
||||||
ikelifetime=60m
|
ikelifetime=60m
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# /etc/strongswan.conf - strongSwan configuration file
|
||||||
|
|
||||||
|
charon {
|
||||||
|
load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random nonce x509 revocation hmac stroke kernel-netlink socket-default updown
|
||||||
|
}
|
||||||
@@ -8,3 +8,4 @@ moon::ipsec start
|
|||||||
sun::ipsec start
|
sun::ipsec start
|
||||||
moon::sleep 2
|
moon::sleep 2
|
||||||
moon::ipsec up net-net
|
moon::ipsec up net-net
|
||||||
|
moon::sleep 1
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
moon::ipsec status::net-net.*INSTALLED::YES
|
moon:: ipsec status 2> /dev/null::net-net.*ESTABLISHED.*moon.strongswan.org.*sun.strongswan.org::YES
|
||||||
sun::ipsec status::net.net.*INSTALLED::YES
|
sun:: ipsec status 2> /dev/null::net-net.*ESTABLISHED.*sun.strongswan.org.*moon.strongswan.org::YES
|
||||||
|
moon:: ipsec status 2> /dev/null::net-net.*INSTALLED, TUNNEL::YES
|
||||||
|
sun:: ipsec status 2> /dev/null::net.net.*INSTALLED, TUNNEL::YES
|
||||||
alice::ping6 -c 1 -p deadbeef ip6-bob.strongswan.org::64 bytes from ip6-bob.strongswan.org: icmp_seq=1::YES
|
alice::ping6 -c 1 -p deadbeef ip6-bob.strongswan.org::64 bytes from ip6-bob.strongswan.org: icmp_seq=1::YES
|
||||||
sun::tcpdump::IP6 ip6-moon.strongswan.org > ip6-sun.strongswan.org: ESP::YES
|
sun::tcpdump::IP6 ip6-moon.strongswan.org > ip6-sun.strongswan.org: ESP::YES
|
||||||
sun::tcpdump::IP6 ip6-sun.strongswan.org > ip6-moon.strongswan.org: ESP::YES
|
sun::tcpdump::IP6 ip6-sun.strongswan.org > ip6-moon.strongswan.org: ESP::YES
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||||
|
|
||||||
config setup
|
config setup
|
||||||
strictcrlpolicy=no
|
|
||||||
crlcheckinterval=180
|
|
||||||
plutostart=no
|
plutostart=no
|
||||||
|
|
||||||
ca strongswan
|
ca strongswan
|
||||||
|
|||||||
@@ -2,5 +2,5 @@
|
|||||||
|
|
||||||
charon {
|
charon {
|
||||||
hash_and_url = yes
|
hash_and_url = yes
|
||||||
load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random x509 revocation hmac xcbc stroke kernel-netlink socket-default updown
|
load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random nonce x509 revocation hmac stroke kernel-netlink socket-default updown
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||||
|
|
||||||
config setup
|
config setup
|
||||||
strictcrlpolicy=no
|
|
||||||
crlcheckinterval=180
|
|
||||||
plutostart=no
|
plutostart=no
|
||||||
|
|
||||||
ca strongswan
|
ca strongswan
|
||||||
|
|||||||
@@ -2,5 +2,5 @@
|
|||||||
|
|
||||||
charon {
|
charon {
|
||||||
hash_and_url = yes
|
hash_and_url = yes
|
||||||
load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random x509 revocation hmac xcbc stroke kernel-netlink socket-default updown
|
load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random nonce x509 revocation hmac stroke kernel-netlink socket-default updown
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
moon::ipsec status::net-net.*STATE_QUICK_I2.*IPsec SA established::YES
|
moon:: ipsec status 2> /dev/null::net-net.*ESTABLISHED.*moon.strongswan.org.*sun.strongswan.org::YES
|
||||||
sun::ipsec status::net.net.*STATE_QUICK_R2.*IPsec SA established::YES
|
sun:: ipsec status 2> /dev/null::net.net.*ESTABLISHED.*sun.strongswan.org.*moon.strongswan.org::YES
|
||||||
|
moon:: ipsec status 2> /dev/null::net-net.*INSTALLED, TUNNEL::YES
|
||||||
|
sun:: ipsec status 2> /dev/null::net.net.*INSTALLED, TUNNEL::YES
|
||||||
alice::ping -c 1 PH_IP_BOB::64 bytes from PH_IP_BOB: icmp_seq=1::YES
|
alice::ping -c 1 PH_IP_BOB::64 bytes from PH_IP_BOB: icmp_seq=1::YES
|
||||||
sun::tcpdump::IP6 ip6-moon.strongswan.org > ip6-sun.strongswan.org: ESP::YES
|
sun::tcpdump::IP6 ip6-moon.strongswan.org > ip6-sun.strongswan.org: ESP::YES
|
||||||
sun::tcpdump::IP6 ip6-sun.strongswan.org > ip6-moon.strongswan.org: ESP::YES
|
sun::tcpdump::IP6 ip6-sun.strongswan.org > ip6-moon.strongswan.org: ESP::YES
|
||||||
|
|||||||
@@ -37,9 +37,6 @@ start() {
|
|||||||
ip6tables -A INPUT -i eth0 -p udp --sport 4500 --dport 4500 -j ACCEPT
|
ip6tables -A INPUT -i eth0 -p udp --sport 4500 --dport 4500 -j ACCEPT
|
||||||
ip6tables -A OUTPUT -o eth0 -p udp --dport 4500 --sport 4500 -j ACCEPT
|
ip6tables -A OUTPUT -o eth0 -p udp --dport 4500 --sport 4500 -j ACCEPT
|
||||||
|
|
||||||
# allow last UDP fragment
|
|
||||||
ip6tables -A INPUT -i eth0 -p udp -m frag --fraglast -j ACCEPT
|
|
||||||
|
|
||||||
# allow ICMPv6 neighbor-solicitations
|
# allow ICMPv6 neighbor-solicitations
|
||||||
ip6tables -A INPUT -p icmpv6 --icmpv6-type neighbor-solicitation -j ACCEPT
|
ip6tables -A INPUT -p icmpv6 --icmpv6-type neighbor-solicitation -j ACCEPT
|
||||||
ip6tables -A OUTPUT -p icmpv6 --icmpv6-type neighbor-solicitation -j ACCEPT
|
ip6tables -A OUTPUT -p icmpv6 --icmpv6-type neighbor-solicitation -j ACCEPT
|
||||||
@@ -48,9 +45,13 @@ start() {
|
|||||||
ip6tables -A INPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
ip6tables -A INPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
||||||
ip6tables -A OUTPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
ip6tables -A OUTPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
||||||
|
|
||||||
# allow crl fetch from winnetou
|
# allow last IPv6 UDP fragments
|
||||||
iptables -A INPUT -i eth0 -p tcp --sport 80 -s PH_IP_WINNETOU -j ACCEPT
|
ip6tables -A INPUT -p udp -m frag --fraglast -j ACCEPT
|
||||||
iptables -A OUTPUT -o eth0 -p tcp --dport 80 -d PH_IP_WINNETOU -j ACCEPT
|
ip6tables -A OUTPUT -p udp -m frag --fraglast -j ACCEPT
|
||||||
|
|
||||||
|
# allow crl and certificate fetch from winnetou
|
||||||
|
ip6tables -A INPUT -i eth0 -p tcp --sport 80 -s PH_IP6_WINNETOU -j ACCEPT
|
||||||
|
ip6tables -A OUTPUT -o eth0 -p tcp --dport 80 -d PH_IP6_WINNETOU -j ACCEPT
|
||||||
|
|
||||||
# allow ssh
|
# allow ssh
|
||||||
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
|
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||||
|
|
||||||
config setup
|
config setup
|
||||||
strictcrlpolicy=no
|
plutostart=no
|
||||||
crlcheckinterval=180
|
|
||||||
charonstart=no
|
ca strongswan
|
||||||
plutodebug=control
|
cacert=strongswanCert.pem
|
||||||
|
certuribase=http://ip6-winnetou.strongswan.org/certs/
|
||||||
|
crluri=http://ip6-winnetou.strongswan.org/strongswan.crl
|
||||||
|
auto=add
|
||||||
|
|
||||||
conn %default
|
conn %default
|
||||||
ikelifetime=60m
|
ikelifetime=60m
|
||||||
@@ -12,7 +15,6 @@ conn %default
|
|||||||
rekeymargin=3m
|
rekeymargin=3m
|
||||||
keyingtries=1
|
keyingtries=1
|
||||||
keyexchange=ikev1
|
keyexchange=ikev1
|
||||||
mobike=no
|
|
||||||
|
|
||||||
conn net-net
|
conn net-net
|
||||||
also=host-host
|
also=host-host
|
||||||
@@ -23,6 +25,7 @@ conn host-host
|
|||||||
left=PH_IP6_MOON
|
left=PH_IP6_MOON
|
||||||
leftcert=moonCert.pem
|
leftcert=moonCert.pem
|
||||||
[email protected]
|
[email protected]
|
||||||
|
leftfirewall=yes
|
||||||
right=PH_IP6_SUN
|
right=PH_IP6_SUN
|
||||||
[email protected]
|
[email protected]
|
||||||
auto=add
|
auto=add
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# /etc/strongswan.conf - strongSwan configuration file
|
||||||
|
|
||||||
|
charon {
|
||||||
|
load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random nonce x509 revocation hmac stroke kernel-netlink socket-default updown
|
||||||
|
}
|
||||||
@@ -37,9 +37,6 @@ start() {
|
|||||||
ip6tables -A INPUT -i eth0 -p udp --sport 4500 --dport 4500 -j ACCEPT
|
ip6tables -A INPUT -i eth0 -p udp --sport 4500 --dport 4500 -j ACCEPT
|
||||||
ip6tables -A OUTPUT -o eth0 -p udp --dport 4500 --sport 4500 -j ACCEPT
|
ip6tables -A OUTPUT -o eth0 -p udp --dport 4500 --sport 4500 -j ACCEPT
|
||||||
|
|
||||||
# allow last UDP fragment
|
|
||||||
ip6tables -A INPUT -i eth0 -p udp -m frag --fraglast -j ACCEPT
|
|
||||||
|
|
||||||
# allow ICMPv6 neighbor-solicitations
|
# allow ICMPv6 neighbor-solicitations
|
||||||
ip6tables -A INPUT -p icmpv6 --icmpv6-type neighbor-solicitation -j ACCEPT
|
ip6tables -A INPUT -p icmpv6 --icmpv6-type neighbor-solicitation -j ACCEPT
|
||||||
ip6tables -A OUTPUT -p icmpv6 --icmpv6-type neighbor-solicitation -j ACCEPT
|
ip6tables -A OUTPUT -p icmpv6 --icmpv6-type neighbor-solicitation -j ACCEPT
|
||||||
@@ -48,9 +45,13 @@ start() {
|
|||||||
ip6tables -A INPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
ip6tables -A INPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
||||||
ip6tables -A OUTPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
ip6tables -A OUTPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
||||||
|
|
||||||
# allow crl fetch from winnetou
|
# allow last IPv6 UDP fragments
|
||||||
iptables -A INPUT -i eth0 -p tcp --sport 80 -s PH_IP_WINNETOU -j ACCEPT
|
ip6tables -A INPUT -p udp -m frag --fraglast -j ACCEPT
|
||||||
iptables -A OUTPUT -o eth0 -p tcp --dport 80 -d PH_IP_WINNETOU -j ACCEPT
|
ip6tables -A OUTPUT -p udp -m frag --fraglast -j ACCEPT
|
||||||
|
|
||||||
|
# allow crl and certificate fetch from winnetou
|
||||||
|
ip6tables -A INPUT -i eth0 -p tcp --sport 80 -s PH_IP6_WINNETOU -j ACCEPT
|
||||||
|
ip6tables -A OUTPUT -o eth0 -p tcp --dport 80 -d PH_IP6_WINNETOU -j ACCEPT
|
||||||
|
|
||||||
# allow ssh
|
# allow ssh
|
||||||
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
|
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||||
|
|
||||||
config setup
|
config setup
|
||||||
strictcrlpolicy=no
|
plutostart=no
|
||||||
crlcheckinterval=180
|
|
||||||
charonstart=no
|
ca strongswan
|
||||||
plutodebug=control
|
cacert=strongswanCert.pem
|
||||||
|
certuribase=http://ip6-winnetou.strongswan.org/certs/
|
||||||
|
crluri=http://ip6-winnetou.org/strongswan.crl
|
||||||
|
auto=add
|
||||||
|
|
||||||
conn %default
|
conn %default
|
||||||
ikelifetime=60m
|
ikelifetime=60m
|
||||||
@@ -12,7 +15,6 @@ conn %default
|
|||||||
rekeymargin=3m
|
rekeymargin=3m
|
||||||
keyingtries=1
|
keyingtries=1
|
||||||
keyexchange=ikev1
|
keyexchange=ikev1
|
||||||
mobike=no
|
|
||||||
|
|
||||||
conn net-net
|
conn net-net
|
||||||
also=host-host
|
also=host-host
|
||||||
@@ -23,6 +25,7 @@ conn host-host
|
|||||||
left=PH_IP6_SUN
|
left=PH_IP6_SUN
|
||||||
leftcert=sunCert.pem
|
leftcert=sunCert.pem
|
||||||
[email protected]
|
[email protected]
|
||||||
|
leftfirewall=yes
|
||||||
right=PH_IP6_MOON
|
right=PH_IP6_MOON
|
||||||
[email protected]
|
[email protected]
|
||||||
auto=add
|
auto=add
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# /etc/strongswan.conf - strongSwan configuration file
|
||||||
|
|
||||||
|
charon {
|
||||||
|
load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random nonce x509 revocation hmac stroke kernel-netlink socket-default updown
|
||||||
|
}
|
||||||
@@ -1,2 +1,4 @@
|
|||||||
moon::ipsec stop
|
moon::ipsec stop
|
||||||
sun::ipsec stop
|
sun::ipsec stop
|
||||||
|
moon::/etc/init.d/iptables stop 2> /dev/null
|
||||||
|
sun::/etc/init.d/iptables stop 2> /dev/null
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
moon::echo 1 > /proc/sys/net/ipv4/ip_forward
|
moon::/etc/init.d/iptables start 2> /dev/null
|
||||||
sun::echo 1 > /proc/sys/net/ipv4/ip_forward
|
sun::/etc/init.d/iptables start 2> /dev/null
|
||||||
moon::ipsec start
|
moon::ipsec start
|
||||||
sun::ipsec start
|
sun::ipsec start
|
||||||
moon::sleep 2
|
moon::sleep 2
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
moon::ipsec status::net-net.*INSTALLED::YES
|
moon:: ipsec status 2> /dev/null::net-net.*ESTABLISHED.*moon.strongswan.org.*sun.strongswan.org::YES
|
||||||
sun::ipsec status::net.net.*INSTALLED::YES
|
sun:: ipsec status 2> /dev/null::net.net.*ESTABLISHED.*sun.strongswan.org.*moon.strongswan.org::YES
|
||||||
|
moon:: ipsec status 2> /dev/null::net-net.*INSTALLED, TUNNEL::YES
|
||||||
|
sun:: ipsec status 2> /dev/null::net.net.*INSTALLED, TUNNEL::YES
|
||||||
alice::ping -c 1 PH_IP_BOB::64 bytes from PH_IP_BOB: icmp_seq=1::YES
|
alice::ping -c 1 PH_IP_BOB::64 bytes from PH_IP_BOB: icmp_seq=1::YES
|
||||||
sun::tcpdump::IP6 ip6-moon.strongswan.org > ip6-sun.strongswan.org: ESP::YES
|
sun::tcpdump::IP6 ip6-moon.strongswan.org > ip6-sun.strongswan.org: ESP::YES
|
||||||
sun::tcpdump::IP6 ip6-sun.strongswan.org > ip6-moon.strongswan.org: ESP::YES
|
sun::tcpdump::IP6 ip6-sun.strongswan.org > ip6-moon.strongswan.org: ESP::YES
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||||
|
|
||||||
config setup
|
config setup
|
||||||
strictcrlpolicy=no
|
|
||||||
crlcheckinterval=180
|
|
||||||
plutostart=no
|
plutostart=no
|
||||||
|
|
||||||
ca strongswan
|
ca strongswan
|
||||||
|
|||||||
@@ -2,5 +2,5 @@
|
|||||||
|
|
||||||
charon {
|
charon {
|
||||||
hash_and_url = yes
|
hash_and_url = yes
|
||||||
load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random x509 revocation hmac xcbc stroke kernel-netlink socket-default updown
|
load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random nonce x509 revocation hmac stroke kernel-netlink socket-default updown
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||||
|
|
||||||
config setup
|
config setup
|
||||||
strictcrlpolicy=no
|
|
||||||
crlcheckinterval=180
|
|
||||||
plutostart=no
|
plutostart=no
|
||||||
|
|
||||||
ca strongswan
|
ca strongswan
|
||||||
|
|||||||
@@ -2,5 +2,5 @@
|
|||||||
|
|
||||||
charon {
|
charon {
|
||||||
hash_and_url = yes
|
hash_and_url = yes
|
||||||
load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random x509 revocation hmac xcbc stroke kernel-netlink socket-default updown
|
load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random nonce x509 revocation hmac stroke kernel-netlink socket-default updown
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
moon::ipsec status::net-net.*STATE_QUICK_I2.*IPsec SA established::YES
|
moon:: ipsec status 2> /dev/null::net-net.*ESTABLISHED.*moon.strongswan.org.*sun.strongswan.org::YES
|
||||||
sun::ipsec status::net.net.*STATE_QUICK_R2.*IPsec SA established::YES
|
sun:: ipsec status 2> /dev/null::net.net.*ESTABLISHED.*sun.strongswan.org.*moon.strongswan.org::YES
|
||||||
|
moon:: ipsec status 2> /dev/null::net-net.*INSTALLED, TUNNEL::YES
|
||||||
|
sun:: ipsec status 2> /dev/null::net.net.*INSTALLED, TUNNEL::YES
|
||||||
alice::ping6 -c 1 -p deadbeef ip6-bob.strongswan.org::64 bytes from ip6-bob.strongswan.org: icmp_seq=1::YES
|
alice::ping6 -c 1 -p deadbeef ip6-bob.strongswan.org::64 bytes from ip6-bob.strongswan.org: icmp_seq=1::YES
|
||||||
sun::tcpdump::IP moon.strongswan.org > sun.strongswan.org: ESP::YES
|
sun::tcpdump::IP moon.strongswan.org > sun.strongswan.org: ESP::YES
|
||||||
sun::tcpdump::IP sun.strongswan.org > moon.strongswan.org: ESP::YES
|
sun::tcpdump::IP sun.strongswan.org > moon.strongswan.org: ESP::YES
|
||||||
|
|||||||
@@ -26,27 +26,16 @@ start() {
|
|||||||
/sbin/ip6tables -P FORWARD DROP
|
/sbin/ip6tables -P FORWARD DROP
|
||||||
|
|
||||||
# allow esp
|
# allow esp
|
||||||
ip6tables -A INPUT -i eth0 -p 50 -j ACCEPT
|
iptables -A INPUT -i eth0 -p 50 -j ACCEPT
|
||||||
ip6tables -A OUTPUT -o eth0 -p 50 -j ACCEPT
|
iptables -A OUTPUT -o eth0 -p 50 -j ACCEPT
|
||||||
|
|
||||||
# allow IKE
|
# allow IKE
|
||||||
ip6tables -A INPUT -i eth0 -p udp --sport 500 --dport 500 -j ACCEPT
|
iptables -A INPUT -i eth0 -p udp --sport 500 --dport 500 -j ACCEPT
|
||||||
ip6tables -A OUTPUT -o eth0 -p udp --dport 500 --sport 500 -j ACCEPT
|
iptables -A OUTPUT -o eth0 -p udp --dport 500 --sport 500 -j ACCEPT
|
||||||
|
|
||||||
# allow MobIKE
|
# allow MobIKE
|
||||||
ip6tables -A INPUT -i eth0 -p udp --sport 4500 --dport 4500 -j ACCEPT
|
iptables -A INPUT -i eth0 -p udp --sport 4500 --dport 4500 -j ACCEPT
|
||||||
ip6tables -A OUTPUT -o eth0 -p udp --dport 4500 --sport 4500 -j ACCEPT
|
iptables -A OUTPUT -o eth0 -p udp --dport 4500 --sport 4500 -j ACCEPT
|
||||||
|
|
||||||
# allow last UDP fragment
|
|
||||||
ip6tables -A INPUT -i eth0 -p udp -m frag --fraglast -j ACCEPT
|
|
||||||
|
|
||||||
# allow ICMPv6 neighbor-solicitations
|
|
||||||
ip6tables -A INPUT -p icmpv6 --icmpv6-type neighbor-solicitation -j ACCEPT
|
|
||||||
ip6tables -A OUTPUT -p icmpv6 --icmpv6-type neighbor-solicitation -j ACCEPT
|
|
||||||
|
|
||||||
# allow ICMPv6 neighbor-advertisements
|
|
||||||
ip6tables -A INPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
|
||||||
ip6tables -A OUTPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
|
||||||
|
|
||||||
# allow crl fetch from winnetou
|
# allow crl fetch from winnetou
|
||||||
iptables -A INPUT -i eth0 -p tcp --sport 80 -s PH_IP_WINNETOU -j ACCEPT
|
iptables -A INPUT -i eth0 -p tcp --sport 80 -s PH_IP_WINNETOU -j ACCEPT
|
||||||
@@ -56,6 +45,14 @@ start() {
|
|||||||
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
|
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
|
||||||
iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT
|
iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT
|
||||||
|
|
||||||
|
# allow ICMPv6 neighbor-solicitations
|
||||||
|
ip6tables -A INPUT -p icmpv6 --icmpv6-type neighbor-solicitation -j ACCEPT
|
||||||
|
ip6tables -A OUTPUT -p icmpv6 --icmpv6-type neighbor-solicitation -j ACCEPT
|
||||||
|
|
||||||
|
# allow ICMPv6 neighbor-advertisements
|
||||||
|
ip6tables -A INPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
||||||
|
ip6tables -A OUTPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
||||||
|
|
||||||
# log dropped packets
|
# log dropped packets
|
||||||
ip6tables -A INPUT -j LOG --log-prefix " IN: "
|
ip6tables -A INPUT -j LOG --log-prefix " IN: "
|
||||||
ip6tables -A OUTPUT -j LOG --log-prefix " OUT: "
|
ip6tables -A OUTPUT -j LOG --log-prefix " OUT: "
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||||
|
|
||||||
config setup
|
config setup
|
||||||
strictcrlpolicy=no
|
plutostart=no
|
||||||
crlcheckinterval=180
|
|
||||||
plutodebug=control
|
|
||||||
charonstart=no
|
|
||||||
|
|
||||||
conn %default
|
conn %default
|
||||||
ikelifetime=60m
|
ikelifetime=60m
|
||||||
@@ -15,10 +12,10 @@ conn %default
|
|||||||
|
|
||||||
conn net-net
|
conn net-net
|
||||||
left=PH_IP_MOON
|
left=PH_IP_MOON
|
||||||
leftnexthop=%direct
|
|
||||||
leftsubnet=fec1::0/16
|
leftsubnet=fec1::0/16
|
||||||
leftcert=moonCert.pem
|
leftcert=moonCert.pem
|
||||||
[email protected]
|
[email protected]
|
||||||
|
leftfirewall=yes
|
||||||
right=PH_IP_SUN
|
right=PH_IP_SUN
|
||||||
rightsubnet=fec2::0/16
|
rightsubnet=fec2::0/16
|
||||||
[email protected]
|
[email protected]
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
# /etc/strongswan.conf - strongSwan configuration file
|
# /etc/strongswan.conf - strongSwan configuration file
|
||||||
|
|
||||||
pluto {
|
charon {
|
||||||
load = curl aes des sha1 sha2 md5 pem pkcs1 x509 gmp random hmac kernel-netlink
|
load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random nonce x509 revocation hmac stroke kernel-netlink socket-default updown
|
||||||
|
install_routes = no
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,27 +26,16 @@ start() {
|
|||||||
/sbin/ip6tables -P FORWARD DROP
|
/sbin/ip6tables -P FORWARD DROP
|
||||||
|
|
||||||
# allow esp
|
# allow esp
|
||||||
ip6tables -A INPUT -i eth0 -p 50 -j ACCEPT
|
iptables -A INPUT -i eth0 -p 50 -j ACCEPT
|
||||||
ip6tables -A OUTPUT -o eth0 -p 50 -j ACCEPT
|
iptables -A OUTPUT -o eth0 -p 50 -j ACCEPT
|
||||||
|
|
||||||
# allow IKE
|
# allow IKE
|
||||||
ip6tables -A INPUT -i eth0 -p udp --sport 500 --dport 500 -j ACCEPT
|
iptables -A INPUT -i eth0 -p udp --sport 500 --dport 500 -j ACCEPT
|
||||||
ip6tables -A OUTPUT -o eth0 -p udp --dport 500 --sport 500 -j ACCEPT
|
iptables -A OUTPUT -o eth0 -p udp --dport 500 --sport 500 -j ACCEPT
|
||||||
|
|
||||||
# allow MobIKE
|
# allow MobIKE
|
||||||
ip6tables -A INPUT -i eth0 -p udp --sport 4500 --dport 4500 -j ACCEPT
|
iptables -A INPUT -i eth0 -p udp --sport 4500 --dport 4500 -j ACCEPT
|
||||||
ip6tables -A OUTPUT -o eth0 -p udp --dport 4500 --sport 4500 -j ACCEPT
|
iptables -A OUTPUT -o eth0 -p udp --dport 4500 --sport 4500 -j ACCEPT
|
||||||
|
|
||||||
# allow last UDP fragment
|
|
||||||
ip6tables -A INPUT -i eth0 -p udp -m frag --fraglast -j ACCEPT
|
|
||||||
|
|
||||||
# allow ICMPv6 neighbor-solicitations
|
|
||||||
ip6tables -A INPUT -p icmpv6 --icmpv6-type neighbor-solicitation -j ACCEPT
|
|
||||||
ip6tables -A OUTPUT -p icmpv6 --icmpv6-type neighbor-solicitation -j ACCEPT
|
|
||||||
|
|
||||||
# allow ICMPv6 neighbor-advertisements
|
|
||||||
ip6tables -A INPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
|
||||||
ip6tables -A OUTPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
|
||||||
|
|
||||||
# allow crl fetch from winnetou
|
# allow crl fetch from winnetou
|
||||||
iptables -A INPUT -i eth0 -p tcp --sport 80 -s PH_IP_WINNETOU -j ACCEPT
|
iptables -A INPUT -i eth0 -p tcp --sport 80 -s PH_IP_WINNETOU -j ACCEPT
|
||||||
@@ -56,6 +45,18 @@ start() {
|
|||||||
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
|
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
|
||||||
iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT
|
iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT
|
||||||
|
|
||||||
|
# allow ICMPv6 neighbor-solicitations
|
||||||
|
ip6tables -A INPUT -p icmpv6 --icmpv6-type neighbor-solicitation -j ACCEPT
|
||||||
|
ip6tables -A OUTPUT -p icmpv6 --icmpv6-type neighbor-solicitation -j ACCEPT
|
||||||
|
|
||||||
|
# allow ICMPv6 neighbor-advertisements
|
||||||
|
ip6tables -A INPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
||||||
|
ip6tables -A OUTPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
||||||
|
|
||||||
|
# allow crl fetch from winnetou
|
||||||
|
iptables -A INPUT -i eth0 -p tcp --sport 80 -s PH_IP_WINNETOU -j ACCEPT
|
||||||
|
iptables -A OUTPUT -o eth0 -p tcp --dport 80 -d PH_IP_WINNETOU -j ACCEPT
|
||||||
|
|
||||||
# log dropped packets
|
# log dropped packets
|
||||||
ip6tables -A INPUT -j LOG --log-prefix " IN: "
|
ip6tables -A INPUT -j LOG --log-prefix " IN: "
|
||||||
ip6tables -A OUTPUT -j LOG --log-prefix " OUT: "
|
ip6tables -A OUTPUT -j LOG --log-prefix " OUT: "
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||||
|
|
||||||
config setup
|
config setup
|
||||||
strictcrlpolicy=no
|
plutostart=no
|
||||||
crlcheckinterval=180
|
|
||||||
plutodebug=control
|
|
||||||
charonstart=no
|
|
||||||
|
|
||||||
conn %default
|
conn %default
|
||||||
ikelifetime=60m
|
ikelifetime=60m
|
||||||
@@ -15,10 +12,10 @@ conn %default
|
|||||||
|
|
||||||
conn net-net
|
conn net-net
|
||||||
left=PH_IP_SUN
|
left=PH_IP_SUN
|
||||||
leftnexthop=%direct
|
|
||||||
leftsubnet=fec2::0/16
|
leftsubnet=fec2::0/16
|
||||||
leftcert=sunCert.pem
|
leftcert=sunCert.pem
|
||||||
[email protected]
|
[email protected]
|
||||||
|
leftfirewall=yes
|
||||||
right=PH_IP_MOON
|
right=PH_IP_MOON
|
||||||
rightsubnet=fec1::0/16
|
rightsubnet=fec1::0/16
|
||||||
[email protected]
|
[email protected]
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
# /etc/strongswan.conf - strongSwan configuration file
|
# /etc/strongswan.conf - strongSwan configuration file
|
||||||
|
|
||||||
pluto {
|
charon {
|
||||||
load = curl aes des sha1 sha2 md5 pem pkcs1 x509 gmp random hmac kernel-netlink
|
load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random nonce x509 revocation hmac stroke kernel-netlink socket-default updown
|
||||||
|
install_routes=no
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,3 +4,5 @@ alice::"ip route del fec2:\:/16 via fec1:\:1"
|
|||||||
moon::"ip route del fec2:\:/16 via fec0:\:2"
|
moon::"ip route del fec2:\:/16 via fec0:\:2"
|
||||||
sun::"ip route del fec1:\:/16 via fec0:\:1"
|
sun::"ip route del fec1:\:/16 via fec0:\:1"
|
||||||
bob::"ip route del fec1:\:/16 via fec2:\:1"
|
bob::"ip route del fec1:\:/16 via fec2:\:1"
|
||||||
|
moon::/etc/init.d/iptables stop 2> /dev/null
|
||||||
|
sun::/etc/init.d/iptables stop 2> /dev/null
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
moon::echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
|
moon::/etc/init.d/iptables start 2> /dev/null
|
||||||
sun::echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
|
sun::/etc/init.d/iptables start 2> /dev/null
|
||||||
alice::"ip route add fec2:\:/16 via fec1:\:1"
|
alice::"ip route add fec2:\:/16 via fec1:\:1"
|
||||||
moon::"ip route add fec2:\:/16 via fec0:\:2"
|
moon::"ip route add fec2:\:/16 via fec0:\:2"
|
||||||
sun::"ip route add fec1:\:/16 via fec0:\:1"
|
sun::"ip route add fec1:\:/16 via fec0:\:1"
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
moon::ipsec status::net-net.*INSTALLED::YES
|
moon:: ipsec status 2> /dev/null::net-net.*ESTABLISHED.*moon.strongswan.org.*sun.strongswan.org::YES
|
||||||
sun::ipsec status::net.net.*INSTALLED::YES
|
sun:: ipsec status 2> /dev/null::net.net.*ESTABLISHED.*sun.strongswan.org.*moon.strongswan.org::YES
|
||||||
|
moon:: ipsec status 2> /dev/null::net-net.*INSTALLED, TUNNEL::YES
|
||||||
|
sun:: ipsec status 2> /dev/null::net.net.*INSTALLED, TUNNEL::YES
|
||||||
alice::ping6 -c 1 -p deadbeef ip6-bob.strongswan.org::64 bytes from ip6-bob.strongswan.org: icmp_seq=1::YES
|
alice::ping6 -c 1 -p deadbeef ip6-bob.strongswan.org::64 bytes from ip6-bob.strongswan.org: icmp_seq=1::YES
|
||||||
sun::tcpdump::IP moon.strongswan.org > sun.strongswan.org: ESP::YES
|
sun::tcpdump::IP moon.strongswan.org > sun.strongswan.org: ESP::YES
|
||||||
sun::tcpdump::IP sun.strongswan.org > moon.strongswan.org: ESP::YES
|
sun::tcpdump::IP sun.strongswan.org > moon.strongswan.org: ESP::YES
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||||
|
|
||||||
config setup
|
config setup
|
||||||
strictcrlpolicy=no
|
|
||||||
crlcheckinterval=180
|
|
||||||
plutostart=no
|
plutostart=no
|
||||||
|
|
||||||
conn %default
|
conn %default
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# /etc/strongswan.conf - strongSwan configuration file
|
# /etc/strongswan.conf - strongSwan configuration file
|
||||||
|
|
||||||
charon {
|
charon {
|
||||||
load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random x509 revocation hmac xcbc stroke kernel-netlink socket-default updown
|
load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random nonce x509 revocation hmac stroke kernel-netlink socket-default updown
|
||||||
install_routes = no
|
install_routes = no
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||||
|
|
||||||
config setup
|
config setup
|
||||||
strictcrlpolicy=no
|
|
||||||
crlcheckinterval=180
|
|
||||||
plutostart=no
|
plutostart=no
|
||||||
|
|
||||||
conn %default
|
conn %default
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# /etc/strongswan.conf - strongSwan configuration file
|
# /etc/strongswan.conf - strongSwan configuration file
|
||||||
|
|
||||||
charon {
|
charon {
|
||||||
load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random x509 revocation hmac xcbc stroke kernel-netlink socket-default updown
|
load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random nonce x509 revocation hmac stroke kernel-netlink socket-default updown
|
||||||
install_routes=no
|
install_routes=no
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
moon::ipsec status::net-net.*INSTALLED::YES
|
moon:: ipsec status 2> /dev/null::net-net.*ESTABLISHED.*moon.strongswan.org.*sun.strongswan.org::YES
|
||||||
sun::ipsec status::net.net.*INSTALLED::YES
|
sun:: ipsec status 2> /dev/null::net.net.*ESTABLISHED.*sun.strongswan.org.*moon.strongswan.org::YES
|
||||||
moon::cat /var/log/daemon.log::TS fec2:\:/16 is contained in address block constraint fec2:\:/16::YES
|
moon:: ipsec status 2> /dev/null::net-net.*INSTALLED, TUNNEL::YES
|
||||||
sun::cat /var/log/daemon.log::TS fec1:\:/16 is contained in address block constraint fec1:\:/16::YES
|
sun:: ipsec status 2> /dev/null::net.net.*INSTALLED, TUNNEL::YES
|
||||||
|
moon:: cat /var/log/daemon.log::TS fec2:\:/16 is contained in address block constraint fec2:\:/16::YES
|
||||||
|
sun:: cat /var/log/daemon.log::TS fec1:\:/16 is contained in address block constraint fec1:\:/16::YES
|
||||||
alice::ping6 -c 1 -p deadbeef ip6-bob.strongswan.org::64 bytes from ip6-bob.strongswan.org: icmp_seq=1::YES
|
alice::ping6 -c 1 -p deadbeef ip6-bob.strongswan.org::64 bytes from ip6-bob.strongswan.org: icmp_seq=1::YES
|
||||||
sun::tcpdump::IP6 ip6-moon.strongswan.org > ip6-sun.strongswan.org: ESP::YES
|
sun::tcpdump::IP6 ip6-moon.strongswan.org > ip6-sun.strongswan.org: ESP::YES
|
||||||
sun::tcpdump::IP6 ip6-sun.strongswan.org > ip6-moon.strongswan.org: ESP::YES
|
sun::tcpdump::IP6 ip6-sun.strongswan.org > ip6-moon.strongswan.org: ESP::YES
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||||
|
|
||||||
config setup
|
config setup
|
||||||
strictcrlpolicy=no
|
|
||||||
crlcheckinterval=180
|
|
||||||
plutostart=no
|
plutostart=no
|
||||||
|
|
||||||
ca strongswan
|
ca strongswan
|
||||||
|
|||||||
@@ -2,5 +2,5 @@
|
|||||||
|
|
||||||
charon {
|
charon {
|
||||||
hash_and_url = yes
|
hash_and_url = yes
|
||||||
load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random x509 revocation addrblock hmac xcbc stroke kernel-netlink socket-default updown
|
load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random nonce x509 revocation addrblock hmac stroke kernel-netlink socket-default updown
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||||
|
|
||||||
config setup
|
config setup
|
||||||
strictcrlpolicy=no
|
|
||||||
crlcheckinterval=180
|
|
||||||
plutostart=no
|
plutostart=no
|
||||||
|
|
||||||
ca strongswan
|
ca strongswan
|
||||||
|
|||||||
@@ -2,5 +2,5 @@
|
|||||||
|
|
||||||
charon {
|
charon {
|
||||||
hash_and_url = yes
|
hash_and_url = yes
|
||||||
load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random x509 revocation addrblock hmac xcbc stroke kernel-netlink socket-default updown
|
load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random nonce x509 revocation addrblock hmac stroke kernel-netlink socket-default updown
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
The roadwarrior <b>carol</b> sets up a connection to gateway <b>moon</b>.
|
The roadwarriors <b>carol</b> and <b>dave</b> set up an IPv6 connection each
|
||||||
The authentication is based on <b>X.509 certificates</b>. Upon the successful
|
to gateway <b>moon</b>. The authentication is based on <b>X.509 certificates</b>.
|
||||||
establishment of the IPsec tunnel, <b>leftfirewall=yes</b> automatically inserts
|
Upon the successful establishment of the IPv6 ESP tunnels, <b>leftfirewall=yes</b>
|
||||||
ip6tables-based firewall rules that let pass the tunneled traffic.
|
automatically inserts ip6tables-based firewall rules that let pass the tunneled traffic.
|
||||||
In order to test both the IPv6 ESP tunnel and the firewall rules, <b>carol</b>
|
In order to test both tunnel and firewall, both <b>carol</b> and <b>dave</b> send
|
||||||
sends an IPv6 ICMP request to the client <b>alice</b> behind the gateway <b>moon</b>
|
an IPv6 ICMP request to the client <b>alice</b> behind the gateway <b>moon</b>
|
||||||
using the ping6 command.
|
using the ping6 command.
|
||||||
|
|||||||
@@ -1,5 +1,15 @@
|
|||||||
carol::ipsec status::home.*STATE_QUICK_I2.*IPsec SA established::YES
|
carol::ipsec status 2> /dev/null::home.*ESTABLISHED.*[email protected].*moon.strongswan.org::YES
|
||||||
moon::ipsec status::rw.*STATE_QUICK_R2.*IPsec SA established::YES
|
dave:: ipsec status 2> /dev/null::home.*ESTABLISHED.*[email protected].*moon.strongswan.org::YES
|
||||||
|
moon:: ipsec status 2> /dev/null::rw\[1]: ESTABLISHED.*moon.strongswan.org.*[email protected]::YES
|
||||||
|
moon:: ipsec status 2> /dev/null::rw\[2]: ESTABLISHED.*moon.strongswan.org.*[email protected]::YES
|
||||||
|
carol::ipsec status 2> /dev/null::home.*INSTALLED, TUNNEL::YES
|
||||||
|
dave:: ipsec status 2> /dev/null::home.*INSTALLED, TUNNEL::YES
|
||||||
|
moon:: ipsec status 2> /dev/null::rw[{]1}.*INSTALLED, TUNNEL::YES
|
||||||
|
moon:: ipsec status 2> /dev/null::rw[{]2}.*INSTALLED, TUNNEL::YES
|
||||||
carol::ping6 -c 1 ip6-alice.strongswan.org::64 bytes from ip6-alice.strongswan.org: icmp_seq=1::YES
|
carol::ping6 -c 1 ip6-alice.strongswan.org::64 bytes from ip6-alice.strongswan.org: icmp_seq=1::YES
|
||||||
|
dave:: ping6 -c 1 ip6-alice.strongswan.org::64 bytes from ip6-alice.strongswan.org: icmp_seq=1::YES
|
||||||
moon::tcpdump::IP6 ip6-carol.strongswan.org > ip6-moon.strongswan.org: ESP::YES
|
moon::tcpdump::IP6 ip6-carol.strongswan.org > ip6-moon.strongswan.org: ESP::YES
|
||||||
moon::tcpdump::IP6 ip6-moon.strongswan.org > ip6-carol.strongswan.org: ESP::YES
|
moon::tcpdump::IP6 ip6-moon.strongswan.org > ip6-carol.strongswan.org: ESP::YES
|
||||||
|
moon::tcpdump::IP6 ip6-dave.strongswan.org > ip6-moon.strongswan.org: ESP::YES
|
||||||
|
moon::tcpdump::IP6 ip6-moon.strongswan.org > ip6-dave.strongswan.org: ESP::YES
|
||||||
|
|
||||||
|
|||||||
@@ -45,14 +45,18 @@ start() {
|
|||||||
ip6tables -A INPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
ip6tables -A INPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
||||||
ip6tables -A OUTPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
ip6tables -A OUTPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
||||||
|
|
||||||
# allow crl fetch from winnetou
|
# allow crl and certificate fetch from winnetou
|
||||||
iptables -A INPUT -i eth0 -p tcp --sport 80 -s PH_IP_WINNETOU -j ACCEPT
|
ip6tables -A INPUT -i eth0 -p tcp --sport 80 -s PH_IP6_WINNETOU -j ACCEPT
|
||||||
iptables -A OUTPUT -o eth0 -p tcp --dport 80 -d PH_IP_WINNETOU -j ACCEPT
|
ip6tables -A OUTPUT -o eth0 -p tcp --dport 80 -d PH_IP6_WINNETOU -j ACCEPT
|
||||||
|
|
||||||
# allow ssh
|
# allow ssh
|
||||||
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
|
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
|
||||||
iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT
|
iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT
|
||||||
|
|
||||||
|
# log dropped packets
|
||||||
|
ip6tables -A INPUT -j LOG --log-prefix " IN: "
|
||||||
|
ip6tables -A OUTPUT -j LOG --log-prefix " OUT: "
|
||||||
|
|
||||||
eend $?
|
eend $?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||||
|
|
||||||
config setup
|
config setup
|
||||||
plutodebug=control
|
plutostart=no
|
||||||
crlcheckinterval=180
|
|
||||||
strictcrlpolicy=no
|
ca strongswan
|
||||||
charonstart=no
|
cacert=strongswanCert.pem
|
||||||
|
certuribase=http://ip6-winnetou.strongswan.org/certs/
|
||||||
|
crluri=http://ip6-winnetou.strongswan.org/strongswan.crl
|
||||||
|
auto=add
|
||||||
|
|
||||||
conn %default
|
conn %default
|
||||||
ikelifetime=60m
|
ikelifetime=60m
|
||||||
@@ -19,10 +22,6 @@ conn home
|
|||||||
[email protected]
|
[email protected]
|
||||||
leftfirewall=yes
|
leftfirewall=yes
|
||||||
right=PH_IP6_MOON
|
right=PH_IP6_MOON
|
||||||
rightsubnet=fec1::/16
|
|
||||||
[email protected]
|
[email protected]
|
||||||
|
rightsubnet=fec1::/16
|
||||||
auto=add
|
auto=add
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# /etc/strongswan.conf - strongSwan configuration file
|
||||||
|
|
||||||
|
charon {
|
||||||
|
load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random nonce x509 revocation hmac stroke kernel-netlink socket-default updown
|
||||||
|
}
|
||||||
+104
@@ -0,0 +1,104 @@
|
|||||||
|
#!/sbin/runscript
|
||||||
|
# Copyright 1999-2004 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
opts="start stop reload"
|
||||||
|
|
||||||
|
depend() {
|
||||||
|
before net
|
||||||
|
need logger
|
||||||
|
}
|
||||||
|
|
||||||
|
start() {
|
||||||
|
ebegin "Starting firewall"
|
||||||
|
|
||||||
|
# enable IP forwarding
|
||||||
|
echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
|
||||||
|
echo 1 > /proc/sys/net/ipv4/ip_forward
|
||||||
|
|
||||||
|
# default policy is DROP
|
||||||
|
/sbin/iptables -P INPUT DROP
|
||||||
|
/sbin/iptables -P OUTPUT DROP
|
||||||
|
/sbin/iptables -P FORWARD DROP
|
||||||
|
|
||||||
|
/sbin/ip6tables -P INPUT DROP
|
||||||
|
/sbin/ip6tables -P OUTPUT DROP
|
||||||
|
/sbin/ip6tables -P FORWARD DROP
|
||||||
|
|
||||||
|
# allow esp
|
||||||
|
ip6tables -A INPUT -i eth0 -p 50 -j ACCEPT
|
||||||
|
ip6tables -A OUTPUT -o eth0 -p 50 -j ACCEPT
|
||||||
|
|
||||||
|
# allow IKE
|
||||||
|
ip6tables -A INPUT -i eth0 -p udp --sport 500 --dport 500 -j ACCEPT
|
||||||
|
ip6tables -A OUTPUT -o eth0 -p udp --dport 500 --sport 500 -j ACCEPT
|
||||||
|
|
||||||
|
# allow MobIKE
|
||||||
|
ip6tables -A INPUT -i eth0 -p udp --sport 4500 --dport 4500 -j ACCEPT
|
||||||
|
ip6tables -A OUTPUT -o eth0 -p udp --dport 4500 --sport 4500 -j ACCEPT
|
||||||
|
|
||||||
|
# allow ICMPv6 neighbor-solicitations
|
||||||
|
ip6tables -A INPUT -p icmpv6 --icmpv6-type neighbor-solicitation -j ACCEPT
|
||||||
|
ip6tables -A OUTPUT -p icmpv6 --icmpv6-type neighbor-solicitation -j ACCEPT
|
||||||
|
|
||||||
|
# allow ICMPv6 neighbor-advertisements
|
||||||
|
ip6tables -A INPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
||||||
|
ip6tables -A OUTPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
||||||
|
|
||||||
|
# allow crl and certificate fetch from winnetou
|
||||||
|
ip6tables -A INPUT -i eth0 -p tcp --sport 80 -s PH_IP6_WINNETOU -j ACCEPT
|
||||||
|
ip6tables -A OUTPUT -o eth0 -p tcp --dport 80 -d PH_IP6_WINNETOU -j ACCEPT
|
||||||
|
|
||||||
|
# allow ssh
|
||||||
|
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
|
||||||
|
iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT
|
||||||
|
|
||||||
|
# log dropped packets
|
||||||
|
ip6tables -A INPUT -j LOG --log-prefix " IN: "
|
||||||
|
ip6tables -A OUTPUT -j LOG --log-prefix " OUT: "
|
||||||
|
|
||||||
|
eend $?
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
ebegin "Stopping firewall"
|
||||||
|
for a in `cat /proc/net/ip_tables_names`; do
|
||||||
|
/sbin/ip6tables -F -t $a
|
||||||
|
/sbin/ip6tables -X -t $a
|
||||||
|
|
||||||
|
/sbin/iptables -F -t $a
|
||||||
|
/sbin/iptables -X -t $a
|
||||||
|
|
||||||
|
if [ $a == nat ]; then
|
||||||
|
/sbin/iptables -t nat -P PREROUTING ACCEPT
|
||||||
|
/sbin/iptables -t nat -P POSTROUTING ACCEPT
|
||||||
|
/sbin/iptables -t nat -P OUTPUT ACCEPT
|
||||||
|
elif [ $a == mangle ]; then
|
||||||
|
/sbin/iptables -t mangle -P PREROUTING ACCEPT
|
||||||
|
/sbin/iptables -t mangle -P INPUT ACCEPT
|
||||||
|
/sbin/iptables -t mangle -P FORWARD ACCEPT
|
||||||
|
/sbin/iptables -t mangle -P OUTPUT ACCEPT
|
||||||
|
/sbin/iptables -t mangle -P POSTROUTING ACCEPT
|
||||||
|
elif [ $a == filter ]; then
|
||||||
|
/sbin/ip6tables -t filter -P INPUT ACCEPT
|
||||||
|
/sbin/ip6tables -t filter -P FORWARD ACCEPT
|
||||||
|
/sbin/ip6tables -t filter -P OUTPUT ACCEPT
|
||||||
|
|
||||||
|
/sbin/iptables -t filter -P INPUT ACCEPT
|
||||||
|
/sbin/iptables -t filter -P FORWARD ACCEPT
|
||||||
|
/sbin/iptables -t filter -P OUTPUT ACCEPT
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
eend $?
|
||||||
|
}
|
||||||
|
|
||||||
|
reload() {
|
||||||
|
ebegin "Flushing firewall"
|
||||||
|
for a in `cat /proc/net/ip_tables_names`; do
|
||||||
|
/sbin/ip6tables -F -t $a
|
||||||
|
/sbin/ip6tables -X -t $a
|
||||||
|
done;
|
||||||
|
eend $?
|
||||||
|
start
|
||||||
|
}
|
||||||
|
|
||||||
+27
@@ -0,0 +1,27 @@
|
|||||||
|
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||||
|
|
||||||
|
config setup
|
||||||
|
plutostart=no
|
||||||
|
|
||||||
|
ca strongswan
|
||||||
|
cacert=strongswanCert.pem
|
||||||
|
certuribase=http://ip6-winnetou.strongswan.org/certs/
|
||||||
|
crluri=http://ip6-winnetou.strongswan.org/strongswan.crl
|
||||||
|
auto=add
|
||||||
|
|
||||||
|
conn %default
|
||||||
|
ikelifetime=60m
|
||||||
|
keylife=20m
|
||||||
|
rekeymargin=3m
|
||||||
|
keyingtries=1
|
||||||
|
keyexchange=ikev1
|
||||||
|
|
||||||
|
conn home
|
||||||
|
left=PH_IP6_DAVE
|
||||||
|
leftcert=daveCert.pem
|
||||||
|
[email protected]
|
||||||
|
leftfirewall=yes
|
||||||
|
right=PH_IP6_MOON
|
||||||
|
[email protected]
|
||||||
|
rightsubnet=fec1::/16
|
||||||
|
auto=add
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# /etc/strongswan.conf - strongSwan configuration file
|
||||||
|
|
||||||
|
charon {
|
||||||
|
load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random nonce x509 revocation hmac stroke kernel-netlink socket-default updown
|
||||||
|
}
|
||||||
@@ -45,14 +45,22 @@ start() {
|
|||||||
ip6tables -A INPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
ip6tables -A INPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
||||||
ip6tables -A OUTPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
ip6tables -A OUTPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
||||||
|
|
||||||
# allow crl fetch from winnetou
|
# allow last IPv6 UDP fragments
|
||||||
iptables -A INPUT -i eth0 -p tcp --sport 80 -s PH_IP_WINNETOU -j ACCEPT
|
ip6tables -A INPUT -p udp -m frag --fraglast -j ACCEPT
|
||||||
iptables -A OUTPUT -o eth0 -p tcp --dport 80 -d PH_IP_WINNETOU -j ACCEPT
|
ip6tables -A OUTPUT -p udp -m frag --fraglast -j ACCEPT
|
||||||
|
|
||||||
|
# allow crl and certificate fetch from winnetou
|
||||||
|
ip6tables -A INPUT -i eth0 -p tcp --sport 80 -s PH_IP6_WINNETOU -j ACCEPT
|
||||||
|
ip6tables -A OUTPUT -o eth0 -p tcp --dport 80 -d PH_IP6_WINNETOU -j ACCEPT
|
||||||
|
|
||||||
# allow ssh
|
# allow ssh
|
||||||
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
|
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
|
||||||
iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT
|
iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT
|
||||||
|
|
||||||
|
# log dropped packets
|
||||||
|
ip6tables -A INPUT -j LOG --log-prefix " IN: "
|
||||||
|
ip6tables -A OUTPUT -j LOG --log-prefix " OUT: "
|
||||||
|
|
||||||
eend $?
|
eend $?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||||
|
|
||||||
config setup
|
config setup
|
||||||
plutodebug=control
|
plutostart=no
|
||||||
crlcheckinterval=180
|
|
||||||
strictcrlpolicy=no
|
ca strongswan
|
||||||
charonstart=no
|
cacert=strongswanCert.pem
|
||||||
|
certuribase=http://ip6-winnetou.strongswan.org/certs/
|
||||||
|
crluri=http://ip6-winnetou.strongswan.org/strongswan.crl
|
||||||
|
auto=add
|
||||||
|
|
||||||
conn %default
|
conn %default
|
||||||
ikelifetime=60m
|
ikelifetime=60m
|
||||||
@@ -19,5 +22,5 @@ conn rw
|
|||||||
[email protected]
|
[email protected]
|
||||||
leftsubnet=fec1::/16
|
leftsubnet=fec1::/16
|
||||||
leftfirewall=yes
|
leftfirewall=yes
|
||||||
right=%any6
|
right=%any
|
||||||
auto=add
|
auto=add
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# /etc/strongswan.conf - strongSwan configuration file
|
||||||
|
|
||||||
|
charon {
|
||||||
|
load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random nonce x509 revocation hmac stroke kernel-netlink socket-default updown
|
||||||
|
}
|
||||||
@@ -1,6 +1,9 @@
|
|||||||
moon::ipsec stop
|
moon::ipsec stop
|
||||||
carol::ipsec stop
|
carol::ipsec stop
|
||||||
alice::"ip route del fec0:\:/16 via fec1:\:1"
|
dave::ipsec stop
|
||||||
carol::"ip route del fec1:\:/16 via fec0:\:1"
|
|
||||||
moon::/etc/init.d/iptables stop 2> /dev/null
|
moon::/etc/init.d/iptables stop 2> /dev/null
|
||||||
carol::/etc/init.d/iptables stop 2> /dev/null
|
carol::/etc/init.d/iptables stop 2> /dev/null
|
||||||
|
dave::/etc/init.d/iptables stop 2> /dev/null
|
||||||
|
alice::"ip route del fec0:\:/16 via fec1:\:1"
|
||||||
|
carol::"ip route del fec1:\:/16 via fec0:\:1"
|
||||||
|
dave::"ip route del fec1:\:/16 via fec0:\:1"
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
moon::/etc/init.d/iptables start 2> /dev/null
|
moon::/etc/init.d/iptables start 2> /dev/null
|
||||||
carol::/etc/init.d/iptables start 2> /dev/null
|
carol::/etc/init.d/iptables start 2> /dev/null
|
||||||
|
dave::/etc/init.d/iptables start 2> /dev/null
|
||||||
alice::"ip route add fec0:\:/16 via fec1:\:1"
|
alice::"ip route add fec0:\:/16 via fec1:\:1"
|
||||||
carol::"ip route add fec1:\:/16 via fec0:\:1"
|
carol::"ip route add fec1:\:/16 via fec0:\:1"
|
||||||
carol::ipsec start
|
dave::"ip route add fec1:\:/16 via fec0:\:1"
|
||||||
moon::ipsec start
|
moon::ipsec start
|
||||||
carol::sleep 2
|
carol::ipsec start
|
||||||
|
dave::ipsec start
|
||||||
|
carol::sleep 1
|
||||||
carol::ipsec up home
|
carol::ipsec up home
|
||||||
|
dave::ipsec up home
|
||||||
|
dave::sleep 2
|
||||||
|
|||||||
@@ -5,11 +5,11 @@
|
|||||||
|
|
||||||
# All UML instances that are required for this test
|
# All UML instances that are required for this test
|
||||||
#
|
#
|
||||||
UMLHOSTS="alice moon carol winnetou"
|
UMLHOSTS="alice moon carol winnetou dave"
|
||||||
|
|
||||||
# Corresponding block diagram
|
# Corresponding block diagram
|
||||||
#
|
#
|
||||||
DIAGRAM="a-m-c-w-ip6.png"
|
DIAGRAM="a-m-c-w-d-ip6.png"
|
||||||
|
|
||||||
# UML instances on which tcpdump is to be started
|
# UML instances on which tcpdump is to be started
|
||||||
#
|
#
|
||||||
@@ -18,4 +18,4 @@ TCPDUMPHOSTS="moon"
|
|||||||
# UML instances on which IPsec is started
|
# UML instances on which IPsec is started
|
||||||
# Used for IPsec logging purposes
|
# Used for IPsec logging purposes
|
||||||
#
|
#
|
||||||
IPSECHOSTS="moon carol"
|
IPSECHOSTS="moon carol dave"
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
moon::ipsec statusall::rw.*ESTABLISHED::YES
|
carol::ipsec status 2> /dev/null::home.*ESTABLISHED.*[email protected].*moon.strongswan.org::YES
|
||||||
carol::ipsec statusall::home.*ESTABLISHED::YES
|
dave:: ipsec status 2> /dev/null::home.*ESTABLISHED.*[email protected].*moon.strongswan.org::YES
|
||||||
dave::ipsec statusall::home.*ESTABLISHED::YES
|
moon:: ipsec status 2> /dev/null::rw\[1]: ESTABLISHED.*moon.strongswan.org.*[email protected]::YES
|
||||||
|
moon:: ipsec status 2> /dev/null::rw\[2]: ESTABLISHED.*moon.strongswan.org.*[email protected]::YES
|
||||||
|
carol::ipsec status 2> /dev/null::home.*INSTALLED, TUNNEL::YES
|
||||||
|
dave:: ipsec status 2> /dev/null::home.*INSTALLED, TUNNEL::YES
|
||||||
|
moon:: ipsec status 2> /dev/null::rw[{]1}.*INSTALLED, TUNNEL::YES
|
||||||
|
moon:: ipsec status 2> /dev/null::rw[{]2}.*INSTALLED, TUNNEL::YES
|
||||||
carol::ping6 -c 1 ip6-alice.strongswan.org::64 bytes from ip6-alice.strongswan.org: icmp_seq=1::YES
|
carol::ping6 -c 1 ip6-alice.strongswan.org::64 bytes from ip6-alice.strongswan.org: icmp_seq=1::YES
|
||||||
dave::ping6 -c 1 ip6-alice.strongswan.org::64 bytes from ip6-alice.strongswan.org: icmp_seq=1::YES
|
dave:: ping6 -c 1 ip6-alice.strongswan.org::64 bytes from ip6-alice.strongswan.org: icmp_seq=1::YES
|
||||||
moon::tcpdump::IP6 ip6-carol.strongswan.org > ip6-moon.strongswan.org: ESP::YES
|
moon::tcpdump::IP6 ip6-carol.strongswan.org > ip6-moon.strongswan.org: ESP::YES
|
||||||
moon::tcpdump::IP6 ip6-moon.strongswan.org > ip6-carol.strongswan.org: ESP::YES
|
moon::tcpdump::IP6 ip6-moon.strongswan.org > ip6-carol.strongswan.org: ESP::YES
|
||||||
moon::tcpdump::IP6 ip6-dave.strongswan.org > ip6-moon.strongswan.org: ESP::YES
|
moon::tcpdump::IP6 ip6-dave.strongswan.org > ip6-moon.strongswan.org: ESP::YES
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||||
|
|
||||||
config setup
|
config setup
|
||||||
crlcheckinterval=180
|
|
||||||
strictcrlpolicy=no
|
|
||||||
plutostart=no
|
plutostart=no
|
||||||
|
|
||||||
ca strongswan
|
ca strongswan
|
||||||
|
|||||||
@@ -2,5 +2,5 @@
|
|||||||
|
|
||||||
charon {
|
charon {
|
||||||
hash_and_url = yes
|
hash_and_url = yes
|
||||||
load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random x509 revocation hmac xcbc stroke kernel-netlink socket-default updown
|
load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random nonce x509 revocation hmac stroke kernel-netlink socket-default updown
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||||
|
|
||||||
config setup
|
config setup
|
||||||
crlcheckinterval=180
|
|
||||||
strictcrlpolicy=no
|
|
||||||
plutostart=no
|
plutostart=no
|
||||||
|
|
||||||
ca strongswan
|
ca strongswan
|
||||||
|
|||||||
@@ -2,5 +2,5 @@
|
|||||||
|
|
||||||
charon {
|
charon {
|
||||||
hash_and_url = yes
|
hash_and_url = yes
|
||||||
load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random x509 revocation hmac xcbc stroke kernel-netlink socket-default updown
|
load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random nonce x509 revocation hmac stroke kernel-netlink socket-default updown
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||||
|
|
||||||
config setup
|
config setup
|
||||||
crlcheckinterval=180
|
|
||||||
strictcrlpolicy=no
|
|
||||||
plutostart=no
|
plutostart=no
|
||||||
|
|
||||||
ca strongswan
|
ca strongswan
|
||||||
|
|||||||
@@ -2,5 +2,5 @@
|
|||||||
|
|
||||||
charon {
|
charon {
|
||||||
hash_and_url = yes
|
hash_and_url = yes
|
||||||
load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random x509 revocation hmac xcbc stroke kernel-netlink socket-default updown
|
load = curl aes des sha1 sha2 md5 pem pkcs1 gmp random nonce x509 revocation hmac stroke kernel-netlink socket-default updown
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
The roadwarrior <b>carol</b> sets up an IPv6 tunnel connection to gateway <b>moon</b>.
|
The roadwarriors <b>carol</b> and <b>dave</b> set up an IPv6 tunnel connection each
|
||||||
The authentication is based on <b>Preshared Keys</b> (PSK) and <b>IPv6 addresses</b> (ID_IPV6_ADDR).
|
to gateway <b>moon</b>. The authentication is based on distinct <b>pre-shared keys</b>
|
||||||
<b>firewall=yes</b> automatically inserts ip6tables-based firewall rules that let pass
|
and IPv6 addresses. Upon the successful establishment of the IPsec tunnels,
|
||||||
the tunneled traffic. In order to test the tunnel <b>carol</b> sends an IPv6
|
<b>leftfirewall=yes</b> automatically inserts ip6tables-based firewall rules that
|
||||||
ICMP request to client <b>alice</b> behind the gateway <b>moon</b> using the ping6 command.
|
let pass the tunneled traffic. In order to test both tunnel and firewall, both
|
||||||
|
<b>carol</b> and <b>dave</b> send an IPv6 ICMP request to client <b>alice</b>
|
||||||
|
behind the gateway <b>moon</b> using the ping6 command.
|
||||||
|
|||||||
@@ -1,5 +1,15 @@
|
|||||||
carol::ipsec status::home.*STATE_QUICK_I2.*IPsec SA established::YES
|
carol::ipsec status 2> /dev/null::home.*ESTABLISHED.*\[fec0.*:10].*\[fec0.*:1]::YES
|
||||||
moon::ipsec status::rw.*STATE_QUICK_R2.*IPsec SA established::YES
|
dave:: ipsec status 2> /dev/null::home.*ESTABLISHED.*\[fec0.*:20].*\[fec0.*:1]::YES
|
||||||
|
moon:: ipsec status 2> /dev/null::rw\[1]: ESTABLISHED.*\[fec0.*:1].*\[fec0.*:10]::YES
|
||||||
|
moon:: ipsec status 2> /dev/null::rw\[2]: ESTABLISHED.*\[fec0.*:1].*\[fec0.*:20]::YES
|
||||||
|
carol::ipsec status 2> /dev/null::home.*INSTALLED, TUNNEL::YES
|
||||||
|
dave:: ipsec status 2> /dev/null::home.*INSTALLED, TUNNEL::YES
|
||||||
|
moon:: ipsec status 2> /dev/null::rw[{]1}.*INSTALLED, TUNNEL::YES
|
||||||
|
moon:: ipsec status 2> /dev/null::rw[{]2}.*INSTALLED, TUNNEL::YES
|
||||||
carol::ping6 -c 1 ip6-alice.strongswan.org::64 bytes from ip6-alice.strongswan.org: icmp_seq=1::YES
|
carol::ping6 -c 1 ip6-alice.strongswan.org::64 bytes from ip6-alice.strongswan.org: icmp_seq=1::YES
|
||||||
|
dave:: ping6 -c 1 ip6-alice.strongswan.org::64 bytes from ip6-alice.strongswan.org: icmp_seq=1::YES
|
||||||
moon::tcpdump::IP6 ip6-carol.strongswan.org > ip6-moon.strongswan.org: ESP::YES
|
moon::tcpdump::IP6 ip6-carol.strongswan.org > ip6-moon.strongswan.org: ESP::YES
|
||||||
moon::tcpdump::IP6 ip6-moon.strongswan.org > ip6-carol.strongswan.org: ESP::YES
|
moon::tcpdump::IP6 ip6-moon.strongswan.org > ip6-carol.strongswan.org: ESP::YES
|
||||||
|
moon::tcpdump::IP6 ip6-dave.strongswan.org > ip6-moon.strongswan.org: ESP::YES
|
||||||
|
moon::tcpdump::IP6 ip6-moon.strongswan.org > ip6-dave.strongswan.org: ESP::YES
|
||||||
|
|
||||||
|
|||||||
@@ -45,14 +45,14 @@ start() {
|
|||||||
ip6tables -A INPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
ip6tables -A INPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
||||||
ip6tables -A OUTPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
ip6tables -A OUTPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
||||||
|
|
||||||
# allow crl fetch from winnetou
|
|
||||||
iptables -A INPUT -i eth0 -p tcp --sport 80 -s PH_IP_WINNETOU -j ACCEPT
|
|
||||||
iptables -A OUTPUT -o eth0 -p tcp --dport 80 -d PH_IP_WINNETOU -j ACCEPT
|
|
||||||
|
|
||||||
# allow ssh
|
# allow ssh
|
||||||
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
|
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
|
||||||
iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT
|
iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT
|
||||||
|
|
||||||
|
# log dropped packets
|
||||||
|
ip6tables -A INPUT -j LOG --log-prefix " IN: "
|
||||||
|
ip6tables -A OUTPUT -j LOG --log-prefix " OUT: "
|
||||||
|
|
||||||
eend $?
|
eend $?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||||
|
|
||||||
config setup
|
config setup
|
||||||
plutodebug=control
|
plutostart=no
|
||||||
charonstart=no
|
|
||||||
|
|
||||||
conn %default
|
conn %default
|
||||||
ikelifetime=60m
|
ikelifetime=60m
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
# /etc/ipsec.secrets - strongSwan IPsec secrets file
|
# /etc/ipsec.secrets - strongSwan IPsec secrets file
|
||||||
|
|
||||||
PH_IP6_CAROL PH_IP6_MOON : PSK 0sv+NkxY9LLZvwj4qCC2o/gGrWDF2d21jL
|
PH_IP6_CAROL : PSK 0sFpZAZqEN6Ti9sqt4ZP5EWcqx
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# /etc/strongswan.conf - strongSwan configuration file
|
||||||
|
|
||||||
|
charon {
|
||||||
|
load = aes des sha1 sha2 md5 pem pkcs1 gmp random nonce hmac stroke kernel-netlink socket-default updown
|
||||||
|
}
|
||||||
@@ -0,0 +1,100 @@
|
|||||||
|
#!/sbin/runscript
|
||||||
|
# Copyright 1999-2004 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
opts="start stop reload"
|
||||||
|
|
||||||
|
depend() {
|
||||||
|
before net
|
||||||
|
need logger
|
||||||
|
}
|
||||||
|
|
||||||
|
start() {
|
||||||
|
ebegin "Starting firewall"
|
||||||
|
|
||||||
|
# enable IP forwarding
|
||||||
|
echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
|
||||||
|
echo 1 > /proc/sys/net/ipv4/ip_forward
|
||||||
|
|
||||||
|
# default policy is DROP
|
||||||
|
/sbin/iptables -P INPUT DROP
|
||||||
|
/sbin/iptables -P OUTPUT DROP
|
||||||
|
/sbin/iptables -P FORWARD DROP
|
||||||
|
|
||||||
|
/sbin/ip6tables -P INPUT DROP
|
||||||
|
/sbin/ip6tables -P OUTPUT DROP
|
||||||
|
/sbin/ip6tables -P FORWARD DROP
|
||||||
|
|
||||||
|
# allow esp
|
||||||
|
ip6tables -A INPUT -i eth0 -p 50 -j ACCEPT
|
||||||
|
ip6tables -A OUTPUT -o eth0 -p 50 -j ACCEPT
|
||||||
|
|
||||||
|
# allow IKE
|
||||||
|
ip6tables -A INPUT -i eth0 -p udp --sport 500 --dport 500 -j ACCEPT
|
||||||
|
ip6tables -A OUTPUT -o eth0 -p udp --dport 500 --sport 500 -j ACCEPT
|
||||||
|
|
||||||
|
# allow MobIKE
|
||||||
|
ip6tables -A INPUT -i eth0 -p udp --sport 4500 --dport 4500 -j ACCEPT
|
||||||
|
ip6tables -A OUTPUT -o eth0 -p udp --dport 4500 --sport 4500 -j ACCEPT
|
||||||
|
|
||||||
|
# allow ICMPv6 neighbor-solicitations
|
||||||
|
ip6tables -A INPUT -p icmpv6 --icmpv6-type neighbor-solicitation -j ACCEPT
|
||||||
|
ip6tables -A OUTPUT -p icmpv6 --icmpv6-type neighbor-solicitation -j ACCEPT
|
||||||
|
|
||||||
|
# allow ICMPv6 neighbor-advertisements
|
||||||
|
ip6tables -A INPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
||||||
|
ip6tables -A OUTPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
||||||
|
|
||||||
|
# allow ssh
|
||||||
|
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
|
||||||
|
iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT
|
||||||
|
|
||||||
|
# log dropped packets
|
||||||
|
ip6tables -A INPUT -j LOG --log-prefix " IN: "
|
||||||
|
ip6tables -A OUTPUT -j LOG --log-prefix " OUT: "
|
||||||
|
|
||||||
|
eend $?
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
ebegin "Stopping firewall"
|
||||||
|
for a in `cat /proc/net/ip_tables_names`; do
|
||||||
|
/sbin/ip6tables -F -t $a
|
||||||
|
/sbin/ip6tables -X -t $a
|
||||||
|
|
||||||
|
/sbin/iptables -F -t $a
|
||||||
|
/sbin/iptables -X -t $a
|
||||||
|
|
||||||
|
if [ $a == nat ]; then
|
||||||
|
/sbin/iptables -t nat -P PREROUTING ACCEPT
|
||||||
|
/sbin/iptables -t nat -P POSTROUTING ACCEPT
|
||||||
|
/sbin/iptables -t nat -P OUTPUT ACCEPT
|
||||||
|
elif [ $a == mangle ]; then
|
||||||
|
/sbin/iptables -t mangle -P PREROUTING ACCEPT
|
||||||
|
/sbin/iptables -t mangle -P INPUT ACCEPT
|
||||||
|
/sbin/iptables -t mangle -P FORWARD ACCEPT
|
||||||
|
/sbin/iptables -t mangle -P OUTPUT ACCEPT
|
||||||
|
/sbin/iptables -t mangle -P POSTROUTING ACCEPT
|
||||||
|
elif [ $a == filter ]; then
|
||||||
|
/sbin/ip6tables -t filter -P INPUT ACCEPT
|
||||||
|
/sbin/ip6tables -t filter -P FORWARD ACCEPT
|
||||||
|
/sbin/ip6tables -t filter -P OUTPUT ACCEPT
|
||||||
|
|
||||||
|
/sbin/iptables -t filter -P INPUT ACCEPT
|
||||||
|
/sbin/iptables -t filter -P FORWARD ACCEPT
|
||||||
|
/sbin/iptables -t filter -P OUTPUT ACCEPT
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
eend $?
|
||||||
|
}
|
||||||
|
|
||||||
|
reload() {
|
||||||
|
ebegin "Flushing firewall"
|
||||||
|
for a in `cat /proc/net/ip_tables_names`; do
|
||||||
|
/sbin/ip6tables -F -t $a
|
||||||
|
/sbin/ip6tables -X -t $a
|
||||||
|
done;
|
||||||
|
eend $?
|
||||||
|
start
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||||
|
|
||||||
|
config setup
|
||||||
|
strictcrlpolicy=no
|
||||||
|
plutostart=no
|
||||||
|
|
||||||
|
conn %default
|
||||||
|
ikelifetime=60m
|
||||||
|
keylife=20m
|
||||||
|
rekeymargin=3m
|
||||||
|
keyingtries=1
|
||||||
|
keyexchange=ikev1
|
||||||
|
authby=secret
|
||||||
|
|
||||||
|
conn home
|
||||||
|
left=PH_IP6_DAVE
|
||||||
|
leftfirewall=yes
|
||||||
|
right=PH_IP6_MOON
|
||||||
|
rightsubnet=fec1::/16
|
||||||
|
auto=add
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
# /etc/ipsec.secrets - strongSwan IPsec secrets file
|
||||||
|
|
||||||
|
PH_IP6_DAVE : PSK 0sjVzONCF02ncsgiSlmIXeqhGN
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# /etc/strongswan.conf - strongSwan configuration file
|
||||||
|
|
||||||
|
charon {
|
||||||
|
load = aes des sha1 sha2 md5 pem pkcs1 gmp random nonce hmac stroke kernel-netlink socket-default updown
|
||||||
|
}
|
||||||
@@ -45,14 +45,14 @@ start() {
|
|||||||
ip6tables -A INPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
ip6tables -A INPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
||||||
ip6tables -A OUTPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
ip6tables -A OUTPUT -p icmpv6 --icmpv6-type neighbor-advertisement -j ACCEPT
|
||||||
|
|
||||||
# allow crl fetch from winnetou
|
|
||||||
iptables -A INPUT -i eth0 -p tcp --sport 80 -s PH_IP_WINNETOU -j ACCEPT
|
|
||||||
iptables -A OUTPUT -o eth0 -p tcp --dport 80 -d PH_IP_WINNETOU -j ACCEPT
|
|
||||||
|
|
||||||
# allow ssh
|
# allow ssh
|
||||||
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
|
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
|
||||||
iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT
|
iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT
|
||||||
|
|
||||||
|
# log dropped packets
|
||||||
|
ip6tables -A INPUT -j LOG --log-prefix " IN: "
|
||||||
|
ip6tables -A OUTPUT -j LOG --log-prefix " OUT: "
|
||||||
|
|
||||||
eend $?
|
eend $?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||||
|
|
||||||
config setup
|
config setup
|
||||||
plutodebug=control
|
plutostart=no
|
||||||
charonstart=no
|
|
||||||
|
|
||||||
conn %default
|
conn %default
|
||||||
ikelifetime=60m
|
ikelifetime=60m
|
||||||
@@ -16,5 +15,5 @@ conn rw
|
|||||||
left=PH_IP6_MOON
|
left=PH_IP6_MOON
|
||||||
leftsubnet=fec1::/16
|
leftsubnet=fec1::/16
|
||||||
leftfirewall=yes
|
leftfirewall=yes
|
||||||
right=%any6
|
right=%any
|
||||||
auto=add
|
auto=add
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
# /etc/ipsec.secrets - strongSwan IPsec secrets file
|
# /etc/ipsec.secrets - strongSwan IPsec secrets file
|
||||||
|
|
||||||
PH_IP6_MOON %any6 : PSK 0sv+NkxY9LLZvwj4qCC2o/gGrWDF2d21jL
|
PH_IP6_CAROL : PSK 0sFpZAZqEN6Ti9sqt4ZP5EWcqx
|
||||||
|
|
||||||
|
PH_IP6_DAVE : PSK 0sjVzONCF02ncsgiSlmIXeqhGN
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# /etc/strongswan.conf - strongSwan configuration file
|
||||||
|
|
||||||
|
charon {
|
||||||
|
load = aes des sha1 sha2 md5 pem pkcs1 gmp random nonce hmac stroke kernel-netlink socket-default updown
|
||||||
|
}
|
||||||
@@ -1,6 +1,9 @@
|
|||||||
moon::ipsec stop
|
moon::ipsec stop
|
||||||
carol::ipsec stop
|
carol::ipsec stop
|
||||||
alice::"ip route del fec0:\:/16 via fec1:\:1"
|
dave::ipsec stop
|
||||||
carol::"ip route del fec1:\:/16 via fec0:\:1"
|
|
||||||
moon::/etc/init.d/iptables stop 2> /dev/null
|
moon::/etc/init.d/iptables stop 2> /dev/null
|
||||||
carol::/etc/init.d/iptables stop 2> /dev/null
|
carol::/etc/init.d/iptables stop 2> /dev/null
|
||||||
|
dave::/etc/init.d/iptables stop 2> /dev/null
|
||||||
|
alice::"ip route del fec0:\:/16 via fec1:\:1"
|
||||||
|
carol::"ip route del fec1:\:/16 via fec0:\:1"
|
||||||
|
dave::"ip route del fec1:\:/16 via fec0:\:1"
|
||||||
|
|||||||
@@ -1,10 +1,16 @@
|
|||||||
moon::/etc/init.d/iptables start 2> /dev/null
|
moon::/etc/init.d/iptables start 2> /dev/null
|
||||||
carol::/etc/init.d/iptables start 2> /dev/null
|
carol::/etc/init.d/iptables start 2> /dev/null
|
||||||
|
dave::/etc/init.d/iptables start 2> /dev/null
|
||||||
alice::"ip route add fec0:\:/16 via fec1:\:1"
|
alice::"ip route add fec0:\:/16 via fec1:\:1"
|
||||||
carol::"ip route add fec1:\:/16 via fec0:\:1"
|
carol::"ip route add fec1:\:/16 via fec0:\:1"
|
||||||
|
dave::"ip route add fec1:\:/16 via fec0:\:1"
|
||||||
moon::rm /etc/ipsec.d/cacerts/*
|
moon::rm /etc/ipsec.d/cacerts/*
|
||||||
carol::rm /etc/ipsec.d/cacerts/*
|
carol::rm /etc/ipsec.d/cacerts/*
|
||||||
carol::ipsec start
|
dave::rm /etc/ipsec.d/cacerts/*
|
||||||
moon::ipsec start
|
moon::ipsec start
|
||||||
carol::sleep 2
|
carol::ipsec start
|
||||||
|
dave::ipsec start
|
||||||
|
carol::sleep 1
|
||||||
carol::ipsec up home
|
carol::ipsec up home
|
||||||
|
dave::ipsec up home
|
||||||
|
dave::sleep 1
|
||||||
|
|||||||
@@ -5,11 +5,11 @@
|
|||||||
|
|
||||||
# All UML instances that are required for this test
|
# All UML instances that are required for this test
|
||||||
#
|
#
|
||||||
UMLHOSTS="alice moon carol winnetou"
|
UMLHOSTS="alice moon carol winnetou dave"
|
||||||
|
|
||||||
# Corresponding block diagram
|
# Corresponding block diagram
|
||||||
#
|
#
|
||||||
DIAGRAM="a-m-c-w-ip6.png"
|
DIAGRAM="a-m-c-w-d-ip6.png"
|
||||||
|
|
||||||
# UML instances on which tcpdump is to be started
|
# UML instances on which tcpdump is to be started
|
||||||
#
|
#
|
||||||
@@ -18,4 +18,4 @@ TCPDUMPHOSTS="moon"
|
|||||||
# UML instances on which IPsec is started
|
# UML instances on which IPsec is started
|
||||||
# Used for IPsec logging purposes
|
# Used for IPsec logging purposes
|
||||||
#
|
#
|
||||||
IPSECHOSTS="moon carol"
|
IPSECHOSTS="moon carol dave"
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
moon::ipsec statusall::rw.*ESTABLISHED::YES
|
carol::ipsec status 2> /dev/null::home.*ESTABLISHED.*\[fec0.*:10].*\[fec0.*:1]::YES
|
||||||
carol::ipsec statusall::home.*ESTABLISHED::YES
|
dave:: ipsec status 2> /dev/null::home.*ESTABLISHED.*\[fec0.*:20].*\[fec0.*:1]::YES
|
||||||
dave::ipsec statusall::home.*ESTABLISHED::YES
|
moon:: ipsec status 2> /dev/null::rw\[1]: ESTABLISHED.*\[fec0.*:1].*\[fec0.*:10]::YES
|
||||||
|
moon:: ipsec status 2> /dev/null::rw\[2]: ESTABLISHED.*\[fec0.*:1].*\[fec0.*:20]::YES
|
||||||
|
carol::ipsec status 2> /dev/null::home.*INSTALLED, TUNNEL::YES
|
||||||
|
dave:: ipsec status 2> /dev/null::home.*INSTALLED, TUNNEL::YES
|
||||||
|
moon:: ipsec status 2> /dev/null::rw[{]1}.*INSTALLED, TUNNEL::YES
|
||||||
|
moon:: ipsec status 2> /dev/null::rw[{]2}.*INSTALLED, TUNNEL::YES
|
||||||
carol::ping6 -c 1 ip6-alice.strongswan.org::64 bytes from ip6-alice.strongswan.org: icmp_seq=1::YES
|
carol::ping6 -c 1 ip6-alice.strongswan.org::64 bytes from ip6-alice.strongswan.org: icmp_seq=1::YES
|
||||||
dave::ping6 -c 1 ip6-alice.strongswan.org::64 bytes from ip6-alice.strongswan.org: icmp_seq=1::YES
|
dave:: ping6 -c 1 ip6-alice.strongswan.org::64 bytes from ip6-alice.strongswan.org: icmp_seq=1::YES
|
||||||
moon::tcpdump::IP6 ip6-carol.strongswan.org > ip6-moon.strongswan.org: ESP::YES
|
moon::tcpdump::IP6 ip6-carol.strongswan.org > ip6-moon.strongswan.org: ESP::YES
|
||||||
moon::tcpdump::IP6 ip6-moon.strongswan.org > ip6-carol.strongswan.org: ESP::YES
|
moon::tcpdump::IP6 ip6-moon.strongswan.org > ip6-carol.strongswan.org: ESP::YES
|
||||||
moon::tcpdump::IP6 ip6-dave.strongswan.org > ip6-moon.strongswan.org: ESP::YES
|
moon::tcpdump::IP6 ip6-dave.strongswan.org > ip6-moon.strongswan.org: ESP::YES
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# /etc/strongswan.conf - strongSwan configuration file
|
# /etc/strongswan.conf - strongSwan configuration file
|
||||||
|
|
||||||
charon {
|
charon {
|
||||||
load = aes des sha1 sha2 md5 pem pkcs1 gmp random hmac xcbc stroke kernel-netlink socket-default updown
|
load = aes des sha1 sha2 md5 pem pkcs1 gmp random nonce hmac stroke kernel-netlink socket-default updown
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# /etc/strongswan.conf - strongSwan configuration file
|
# /etc/strongswan.conf - strongSwan configuration file
|
||||||
|
|
||||||
charon {
|
charon {
|
||||||
load = aes des sha1 sha2 md5 pem pkcs1 gmp random hmac xcbc stroke kernel-netlink socket-default updown
|
load = aes des sha1 sha2 md5 pem pkcs1 gmp random nonce hmac stroke kernel-netlink socket-default updown
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user