布石 OpenVPN 設定等

% cd /usr/ports/net/openvpn
% sudo -s
% make install

sslははじめっからはいってるosは設定楽だな(笑

http://www.se.openbsd.org/faq/ja/faq13.html
結論を先に。全部こに描いてありました。^^;


いろいろしらべまたが

% man openvpn | col
/usr/local/share/examples/openvpn
ここみたらなんかわかるか
わかんねー(ぷ
/usr/share/ipsec/rc.vpn
設定あーこれっぽいなー
% ee /usr/share/ipsec/rc.vpn

デバグ、Winにクライアントなげ
http://openvpn.se


# For this to work, you will need to have these enabled (in /etc/sysctl.conf):
# 'sysctl net.inet.ip.forwarding=1' (IP packet routing)
# 'sysctl net.inet.esp.enable=1' (IPsec ESP protocol)

% sysctl net.inet.ip.forwarding
net.inet.ip.forwarding=0
% sysctl -w net.inet.ip.forwarding=1
net.inet.ip.forwarding: 0 -> 1
% sysctl net.inet.ip.forwarding
net.inet.ip.forwarding=1

まず、OpenBSD カーネルの IP AH と IP ESP オプションが有効になっていることを確認してください。これはデフォルトで有効化されていますが、以下のようにしてそれを確認しておいてください。

# sysctl net.inet.esp.enable
net.inet.esp.enable = 1

同様に、もし AH が必要なら、以下のようにして有効化されていることを確認してください。

# sysctl net.inet.ah.enable
net.inet.ah.enable = 1


/etc/sysctl.conf
でもFORCE 的に設定しないといけないものは変えとく

net.inet.ip.forwarding=1        # 1=Permit forwarding (routing) of packets
net.inet6.ip6.forwarding=1      # 1=Permit forwarding (routing) of packets
#net.inet6.ip6.accept_rtadv=1   # 1=Permit IPv6 autoconf (forwarding must be 0)
#net.inet.tcp.rfc1323=0         # 0=disable TCP RFC1323 extensions (for if tcp i
#net.inet.tcp.rfc3390=1         # 1=Enable RFC3390 for TCP window increasing
net.inet.esp.enable=1           # 0=Disable the ESP IPsec protocol
net.inet.ah.enable=1            # 0=Disable the AH IPsec protocol
#net.inet.udpencap.enable=0     # 0=Disable ESP-in-UDP encapsulation
#net.inet.ipcomp.enable=1       # 1=Enable the IPCOMP protocol
#net.inet.tcp.ecn=1             # 1=Enable the TCP ECN extension
# This is the isakmpd.conf file for the SERVER
#

[General]
Listen-on= 10.0.0.1

[Phase 1]
Default= ISAKMP-peer-dhcp

[Phase 2]
Passive-connections= IPsec-connection

[ISAKMP-peer-dhcp]
Phase= 1
Local-address= 10.0.0.1
ID= server-fqdn-id
Configuration= IKE-main-mode-config

[server-fqdn-id]
ID-type= FQDN
Name= server

[IKE-main-mode-config]
DOI= IPSEC
EXCHANGE_TYPE= ID_PROT
Transforms= AES-SHA-RSA_SIG, 3DES-SHA-RSA_SIG

[IPsec-connection]
Phase= 2
ISAKMP-peer= ISAKMP-peer-dhcp
Configuration= IKE-quick-mode-config
Local-ID= server-ipv4-id
Remote-ID= generic-ipv4-id

[IKE-quick-mode-config]
DOI= IPSEC
EXCHANGE_TYPE= QUICK_MODE
Suites= QM-ESP-TRP-AES-SHA-SUITE, QM-ESP-TRP-AES-MD5-SUITE, QM-ESP-TRP-3DES-SHA-SUITE, QM-ESP-TRP-3DES-MD5-SUITE

[server-ipv4-id]
ID-type= IPV4_ADDR
Address= 10.0.0.1

[generic-ipv4-id]
ID-type= IPV4_ADDR
Address= 0.0.0.0

[X509-certificates]
Ca-directory= /etc/isakmpd/ca/
Cert-directory= /etc/isakmpd/certs/
Private-key= /etc/isakmpd/private/local.key 
% isakmpd -d -DA=90
Default check_file_secrecy_fd: not loading /etc/isakmpd/isakmpd.conf - too open permissions

% chmod 600 /etc/isakmpd/isakmpd.conf /etc/isakmpd/isakmpd.policy

公式SoftEther活用ガイド

公式SoftEther活用ガイド