You can add capability of raw socket to the executable, hence run as non-root.
Since what you're asking means potentially send illegal (unrouteable) IP packets, I guess that indeed the kernel will require special privileges to enable you to do that. As I said, you can mitigate that with capabilities, or use the old method of start as root, bind socket and drop privileges, or use a small server creating such sockets running as root. On Tue, Mar 4, 2014 at 11:16 AM, Erez D <erez0...@gmail.com> wrote: > > > > On Tue, Mar 4, 2014 at 11:05 AM, Elazar Leibovich <elaz...@gmail.com>wrote: > >> use the SO_BINDTODEVICE setsockopt. >> > requires me to be root ... > >> >> >> On Tue, Mar 4, 2014 at 10:02 AM, Erez D <erez0...@gmail.com> wrote: >> >>> Hello >>> >>> >>> I have 2 external interfaces via two eth cards, both connected to the >>> internet >>> >>> I want to send a udp packet to same host:port, but choose dynamically >>> which interface to use. >>> >>> can this be done with linux, and how ? >>> >>> >>> >>> 10x >>> erez. >>> >>> _______________________________________________ >>> Linux-il mailing list >>> Linux-il@cs.huji.ac.il >>> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il >>> >>> >> >
_______________________________________________ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il