Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Ubuntu add IP in batch

Shulou Source: shulou.com Published: 2022-06-01 04:31:39 10月05日 Update

Ubuntu add ip script in batch

#! / bin/bash

For ((iSuppli > / etc/network/interfaces)

Echo "iface eth0:$i inet static" > > / etc/network/interfaces

Let j=$i+179

Echo "address 45.41.89.Secretj" > > / etc/network/interfaces

Echo "netmask 255.255.255.248" > > / etc/network/interfaces

Echo "gateway 45.41.89.177" > > / etc/network/interfaces

Echo "> > / etc/network/interfaces

Done

# end

There is a script on the (when there are more ip)

Next, the number of ip is less.

Auto eth0:1

Iface eth0:1 inet static

Address 104.237.51.90

Netmask 255.255.255.248

Gateway 104.237.51.89

Auto eth0:2

Iface eth0:2 inet static

Address 104.237.51.91

Netmask 255.255.255.248

Gateway 104.237.51.89

Auto eth0:3

Iface eth0:3 inet static

Address 104.237.51.92

Netmask 255.255.255.248

Gateway 104.237.51.89

Auto eth0:4

Iface eth0:4 inet static

Address 104.237.51.93

Netmask 255.255.255.248

Gateway 104.237.51.89

Tags: Script quantity time program Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Shulou Tech Info vpn Redmi Huawei