jsecchiero.strongswan
Ansible strongSwan 角色
Ansible strongSwan 角色用于配置 strongSwan,支持 Arch Linux、RHEL/CentOS 和 Debian/Ubuntu。
要求
目前该模块仅适用于 Arch Linux,需要通过 AUR 安装软件包,并且需要使用 UFW 管理防火墙,并已修补以支持 GRE 隧道。在公开发布该角色或添加到 Ansible Galaxy 之前,需要解决这个问题。
可能还需要 strongSwan 版本 >= 5.0.0,目前尚未确认。
角色变量
strongswan_packages:
- strongswan
当前要安装的软件包列表。目前这是针对 Arch Linux 的特定设置。
strongswan_conn_default:
auto: add
type: tunnel
authby: psk
keyexchange: ike
ikelifetime: 3h
lifetime: 60m
margintime: 15m
keyingtries: 3
dpdaction: restart
dpddelay: 30
目前放置在 %default
连接中的默认设置。大多数设置均遵循 typical strongSwan 的默认值(大约版本 ~5.0.0)。
strongswan_conn: []
# - name: connection_name
# conn:
# # 连接选项在此处,例如
# ike: aes256gcm16-modp2048!
# esp: aes256gcm16-modp2048!
# left:
# address: local_address
# # 左侧其他选项
# right:
# address: remote_address
# # 右侧其他选项
# secret: abcde...z
要安装到 strongSwan 的连接信息。
示例剧本
- hosts: ipsec_server
roles:
- { role: jonathanio.strongswan, tags: ['ipsec'] }
---
strongswan_hosts:
- name: example
conn:
auto: route
type: tunnel
authby: psk
keyexchange: ikev2
lifetime: 3h
ike: aes256gcm16-modp2048!
esp: aes256gcm16-modp2048!
ikelifetime: 24h
left:
address: 0.0.0.0/0
subnet: 192.168.100.0/24
protoport: 47
id: my
updown: /usr/lib/ipsec/_updown_nat
right:
address: 87.65.43.21
subnet: 192.168.101.0/24
protoport: 47
id: your
updown: /usr/lib/ipsec/_updown_nat
secret: something_needs_to_go_here
许可
GPLv2
作者信息
Jonathan Wright.
安装
ansible-galaxy install jsecchiero.strongswan
许可证
gpl-2.0
下载
2k
拥有者
10x lazineer