跳转到内容
彼岸论坛
欢迎抵达彼岸 彼岸花开 此处谁在 -彼岸论坛

已推荐帖子

发表于

背景:方便在外面连接家中网络
软件环境 OpenWrt SNAPSHOT, r27700 / Linux OpenWrt 6.6.54 / Strongswan 5.9.14
配置 /etc/config/ipsec

config 'ipsec'
	list listen 'wan'
	option 'zone' 'ssvpn'

config 'remote' 'acme'
	option 'enabled' '1'
	option 'gateway' 'any'
	option 'authentication_method' 'pubkey'
	option 'local_gateway' 'xyz.mydomain.cn'
	option 'local_cert' 'xyz.mydomain.cn.cer'
	option 'local_key' 'xyz.mydomain.cn.key'
	option 'rekeytime' '6h'
	option 'keyingretries' '3'
	option 'mobike' '1'
	option 'fragmentation' 'yes'
	option 'keyexchange' 'ikev2'
	option 'local_identifier' 'xyz.mydomain.cn'
	#option 'dpdaction' 'clear'
	list 'local_sourceip' '0.0.0.0'
	list 'local_sourceip' '::'
	list 'crypto_proposal' 'ike_proposal1'
	list 'crypto_proposal' 'ike_proposal2'
	list 'tunnel' 'sstun'
	list 'pools' 'ipv4addr'

config 'crypto_proposal' 'ike_proposal1'
	option 'encryption_algorithm' 'chacha20poly1305'
	option 'dh_group' 'curve25519'
	option 'prf_algorithm' 'prfsha512'

config 'crypto_proposal' 'ike_proposal2'
	option 'encryption_algorithm' 'aes256gcm16'
	option 'dh_group' 'curve25519'
	option 'prf_algorithm' 'prfsha512'

# we don't specify subnets because we're going to use XFRM-interfaced based routes instead
config 'tunnel' 'sstun'
	list 'local_subnet' '0.0.0.0/0'
	#list 'remote_subnet' '0.0.0.0/0'
	list 'remote_subnet' 'dynamic'
	list 'remote_subnet' '224.0.0.0/4'
	option 'if_id' '666'
	option 'rekeytime' '1h'
	option 'dpdaction' 'clear'
	option 'startaction' 'none'
	option 'closeaction' 'none'
	list   'crypto_proposal' 'esp_proposal1'
	list   'crypto_proposal' 'esp_proposal2'

config 'crypto_proposal' 'esp_proposal1'
	option 'encryption_algorithm' 'chacha20poly1305'
	option 'dh_group' 'x25519'

config 'crypto_proposal' 'esp_proposal2'
	option 'encryption_algorithm' 'aes256gcm'
	option 'dh_group' 'modp2048'

config 'pools' 'ipv4addr'
	option 'addrs' '192.168.166.0/24'
	list 'dns' '192.168.163.1'

配置 VPN 用户/etc/swanctl/conf.d/10.EAP_MSCHAPv2.users.conf

secrets {
    eap-user1 {
        id = user1
        secret = "user11980#"
    }
}

创建帐户或登录来提出意见

您需要成为会员才能提出意见

创建帐户

注册成为会员.只要几个简单步骤!

注册帐户

登录

已经有帐户? 请在此处登录.

现在登录
  • 游客注册

    游客注册

  • 会员

    没有会员可显示

  • 最新的状态更新

    没有最新的状态更新
  • 最近查看

    • 没有会员查看此页面.
×
×
  • 创建新的...