This file contains 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
<?php | |
$ipList = " | |
192.99.182.41 | |
158.69.56.235 | |
158.69.101.3 | |
158.69.56.236 | |
167.114.11.211 | |
158.69.57.190 | |
192.99.182.223 | |
192.99.182.192 | |
192.99.182.193 | |
192.99.182.195 | |
192.99.182.142 | |
192.99.182.238 | |
158.69.101.41 | |
192.99.182.194 | |
158.69.101.58 | |
158.69.115.179 | |
"; | |
$ips = explode("\n", $ipList); | |
$interfaceAlias = 0; | |
foreach ($ips as $ip) { | |
$ip = trim($ip); | |
if (empty($ip)) continue; | |
echo " | |
auto ens3:$interfaceAlias | |
iface ens3:$interfaceAlias inet static | |
address $ip | |
netmask 255.255.255.255 | |
broadcast $ip | |
"; | |
$interfaceAlias ++; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment