Trying to bind 20 x /24 subnets in Ubuntu 14 Server (for proxy/VPN) but I'm stuck here. These are diversified /24 subnets.
I tried the below method via script called addips.sh
Code:
for i in $(seq 3 254); do echo "auto em1:$i
iface em1:$i inet static
address xxx.xxx.16.$i
netmask 255.255.255.0
" >> virthosts; done
But, I noticed that this happened now:
Each /24 subnet it outputted started off at #1 again instead of 255, 256, 257, etc all the way through consecutively for all 20 x /24 subnets
Code:
auto em1:1
auto em1:254
Then again...
auto em1:1
...
How can I properly change this so it does reset at #1? em1 is the NIC Ethernet port (primary) and only port used too.
I also want to make sure these are permanent, they stick after a server reboot.