Tag Archives: net

Webmin 1.480: Bulk add ip addresses

A few months ago I published a patch for webmin that would allow you to easily add a lot of ip addresses to an interface in webmin. At that time I mentioned that the patch could only be applied on webmin 1.410.

Now I needed this patch again but this time on webmin 1.480 so I adapted it to work with the new version.

For usage instructions please see the original post

You can download the new version here: webmin bulk add net aliases-1.480 (4.13 KB)

Notes

This only works for interfaces activated at boot. The code could easily be copied to work with the other interfaces too but I didn't see a use for that.

After you add the ip addresses ( aliases ) you have to go to the list of interfaces, select the newly added interfaces and click the "Apply selected interfaces" button if you want the new aliases to be activated without having to reboot.

Webmin Bulk Add Ip Addresses

Problem

you want to add multiple ips ( aliases ) to a network interface using webmin's Net module. Adding them one by one is a slow process.

Solution

Modify webmin's Net module to allow you to copy/paste ip addresses in a textbox ( one per line ) and then click once and wait for it to do it's job.

Here's the patch for webmin 1.410, I know it's an old version but it should be easy to adapt for newer versions, let me know if you need any help.

Install

Download:  webmin bulk add net aliases-1.410 (5.26 KB)

Apply patch:

  1. cd webmin/net #or wherever webmin is
  2. patch -p1 < webmin-net-bulk-aliases.patch

Usage

Log into webmin as root/admin , go to network configuration, click on  an interface in the interfaces section, click the "Add virtual interface" link and now you should see a text box where you can just insert each ip on a new line. then just click the "Create" button