I have a dedicated server and I ordered a /29 subnet for this server which contains 6 IPs.

I can add those IP addresses one by one to the server (/etc/network/interfaces) like this and I become able to connect to the server from them;

iface eth0 inet static
iface eth0 inet static
iface eth0 inet static

So I basically need to add each IP like this but I wonder if there's a way to attach those IP addresses to my server without having to add each IP to the /etc/network/interfaces file?

I tried this but it didn't work;

iface eth0 inet static

This only allowed me to connect through and not through 1.2, 1.3 and so on.

  • I doubt it would work (and would not recommend it even if it does), but what happens if you use - ie the broadcast address? – davidgo Aug 31 '19 at 10:19
  • It only enables access from that address. – Marry Jane Aug 31 '19 at 15:24

Unfortunately, this is impossible

| improve this answer | |
  • Not sure why this was down voted? – davidgo Aug 31 '19 at 10:16
  • Don't know either :/ – Dominik Matis Aug 31 '19 at 10:17
  • Maybe because of the implication that it would be possible with dynamic IPs? (It's not possible in any case.) – user1686 Aug 31 '19 at 12:06
  • 1
    This answer is (unfortunately) correct. Only scripting could make this possible. It’s not worth it, though. – Daniel B Aug 31 '19 at 12:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.