Created
September 4, 2017 13:31
-
-
Save hennevogel/aa7bc30f9695eb16746fd2d92ded2b04 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Net::Domain; | |
use Socket; | |
my $frontend="frontend"; | |
# If defined, restrict access to the backend servers (bs_repserver, bs_srcserver, bs_service) | |
our $ipaccess = { | |
'127\..*' => 'rw', # only the localhost can write to the backend | |
"^$ip" => 'rw', # Permit IP of FQDN | |
'.*' => 'worker', # build results can be delivered from any client in the network | |
}; | |
# IP of the WebUI/API Server (only used for $ipaccess) | |
if ($frontend) { | |
my $frontendip = quotemeta inet_ntoa(inet_aton($frontend) || inet_aton("localhost")); | |
$ipaccess->{$frontendip} = 'rw' ; # in dotted.quad format | |
} | |
print "@{[ %$ipaccess ]}\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment