Score:0

Network interface binding only working for root user

my flag

I have a computer running Ubuntu Server 20.04.3 (using netplan for networking), and I am running into an issue where programs that support binding to a network interface continue to use the default route unless I run them as root. For example, when I run a command such curl --interface myinterface ipchecker.example.com rather than binding to myinterface, curl still sends the traffic through the default route (unless I run it as root).

On my other computer running Ubuntu Desktop 21.04 (using NetworkManager for networking), this problem doesn't exist, and I can freely bind to interfaces without root privileges. Is there a way to do this in Ubuntu Server and netplan?

waltinator avatar
it flag
Look at `ip route show`, or `ip r`, read `man ip ip-route`.
Denatonium Benzoate avatar
my flag
@waltinator I'm not adding the second interface's routes to the routing table, because I want all programs to go through the default route, except for the programs which I have specifically told to bind to the other interface. I don't want to touch the routing table. This works fine when using NetworkManager, but there's something about systemd-networkd and netplan that's causing issues with this approach.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.