thank you. The command is:
Now I can modify my script https://forum.opnsense.org/index.php?topic=24887.msg125557 which assign A records with Unbound DNS:
Replace the line
with
Code Select
# swanctl --list-pools --leases
no files found matching '/usr/local/etc/strongswan.opnsense.d/*.conf'
defaultv4 172.16.0.0 7 / 0 / 65534
172.16.0.1 online 'UserA'
172.16.0.2 online 'UserB'
172.16.0.3 online 'UserC'
172.16.0.4 online 'UserD'
Now I can modify my script https://forum.opnsense.org/index.php?topic=24887.msg125557 which assign A records with Unbound DNS:
Replace the line
Code Select
ipsec leases | grep " 172.16" |sed "s/'//g" | while read line
with
Code Select
swanctl --list-pools --leases 2>nul | grep "172.16.*online" |sed "s/'//g" | while read line