mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 11:13:24 +02:00
wireguard: add IP on road warrior interface wg0
Choose one IP from client pool and add it to road warrior interface wg0 so road warrior VPN client could reach firewall through the VPN Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
This commit is contained in:
@@ -344,6 +344,9 @@ sub free_pool_addresses($$) {
|
||||
my @used_addresses = ();
|
||||
my @free_addresses = ();
|
||||
|
||||
# wg0 IP is reserved so put in @used_addresses
|
||||
push(@used_addresses, &Network::ip2bin($settings{'ADDRESS'}));
|
||||
|
||||
# Collect all used addresses
|
||||
foreach my $key (keys %peers) {
|
||||
my $peer = &load_peer($key);
|
||||
|
||||
Reference in New Issue
Block a user