I am curious if it is possible to setup anchor ip gateway as default router so all outbound traffic from droplet shows to external services as coming from floating ip.
This will greatly simplify my external system firewall setup since floating ip never changes; I can allow all connections from floating ip.
I tried adding the anchor ip gateway as the defaultrouter in /etc/rc.conf and reboot but this did not work. (curl -s http://169.254.169.254/metadata/v1/interfaces/public/0/anchor_ipv4/gateway)
I am using freebsd, but welcome any linux recommendations as well. There may be multiple ways to achieve this (e.g. routes, routed, iptables), but what is the CLEANEST approach, and is this even possible on Digital Ocean?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.