Hello,
i want a setup like the attached picture.
The most of the setup works.
When i connect from any application server to the database server (this server is only private available) the application server has not the private ip but rather the public ip.
I get it working when i set an route for the private network subnet go over the second network interface (private network interface).
My problem is that i try to create an persistent route for the server. It doesn't works.
The interface config for one of the vms:
When i manually execute the last line it works. But not automatically on startup.
Thanks for help
Best regards,
exii88
i want a setup like the attached picture.
The most of the setup works.
When i connect from any application server to the database server (this server is only private available) the application server has not the private ip but rather the public ip.
I get it working when i set an route for the private network subnet go over the second network interface (private network interface).
My problem is that i try to create an persistent route for the server. It doesn't works.
The interface config for one of the vms:
Code:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 138.***.***.***
netmask 255.255.255.255
post-up ip route add 138.***.***.*** dev eth0
post-up ip route add default via 138.***.***.***
pre-down ip route del default via 138.***.***.***
pre-down ip route del 138.***.***.*** dev eth0
iface eth0 inet6 static
auto eth1
iface eth1 inet static
address 192.168.99.101
netmask 255.255.255.255
post-up ip route add 192.168.99.1 dev eth1
post-up ip route add default via 192.168.99.1
pre-down ip route del default via 192.168.99.1
pre-down ip route del 192.168.99.1 dev eth1
up route add -net 192.168.99.0 netmask 255.255.255.0 gw 192.168.99.1 dev eth1
When i manually execute the last line it works. But not automatically on startup.
Thanks for help
Best regards,
exii88
Last edited: