Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Ubuntu add IP in batch

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

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

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report