On Ubuntu 16.04, the default route for IPv4 is an interface other than eth0.
If I try to
curl -vvv --interface eth0 v4.ifconfig.co
I get
* SO_BINDTODEVICE eth0 failed with errno 1: Operation not permitted; will do regular bind
But if I sudo
it works fine.
How do I change the config so that services running under this non privileged user can use eth0 for IPv4? I don't think I can just change sudo config to allow this because I don't want the service to run anything as root. I also want to maintain the default route for IPv4 on the current interface.