Skip to content

Bash script which allows automatically bind IPs ranges to CentOS/RHEL

Notifications You must be signed in to change notification settings

jonsbun/add-ips-centos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Add IP Addresses Range to CentOS

Script which allows you simple bind IPs ranges to CentOS/RHEL based Linux system. All provided ranges will be placed in the /etc/sysconfig/network-scripts directory using separate scripts and ifcfg-eth0-rangeX naming system (where X is a unique number corresponding to a specific range). Keep in mind that this script allows to add multiple IPs ranges at once. However, script supports not bigger than /16 ranges at this moment.

How to Use

You can run this script remotely on any CentOS/RHEL based Linux machine using following command:

bash <(curl -s -L https://git.io/add-ips-centos.sh)

If you want to run this script locally, use these commands:

wget https://git.io/add-ips-centos.sh && chmod +x add-ips-centos.sh
./add-ips-centos.sh

Please follow these rules when you want to add IPs:

  • Write each new range from the new line;
  • Don't use any extra symbols after netmask number;
  • After last range hit Ctrl-D on a blank line to stop input.

About

Bash script which allows automatically bind IPs ranges to CentOS/RHEL

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages