I’m trying to set up a system on AWS that requires something not dissimilar to what the AWS docs show for a “Management Network” environment on this page:
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/scenarios-enis.html
The diagram there shows a box with the “webserver route table”, which is the routing table on the instance that has two network interfaces.
Is there any way to automatically set this table up at “creation” time, without having to manually hack things on the instance?
I found this previous Stack Overflow ticket, where the answer says “to leave the instance route tables alone”, which suggests it is something that can be manipulated, but maybe they just meant within the Linux environment of the instance.
I also found this Server Fault ticket about having multiple interfaces, but the answer there does involve lots of hacking in the instance to get the routing as desired.
Apart from that, Google has drawn a blank for me on any “official” way to set up the routing in a dual-homed AWS instance.
When creating the dual-homed instance, it also looks like the secondary interface also gets a default route provided, even though the route table for the subnet I’m using for the secondary interface doesn’t have a default route. So as well as being able to auto-create static routes for the secondary interface, I would like to also be able to suppress having a default route for the secondary interface.