Hello,
I set up another user next to root on my OpenWRT router. I wanted it to act as a monitoring user for different traffic routing. I routed the specific traffic for the user like this:
iptables -t mangle -N TUNMARK
iptables -t mangle -A TUNMARK -j MARK --set-mark 2
iptables -t mangle -A TUNMARK -j CONNMARK --save-mark
iptables -t mangle -N RESTOREMARK
iptables -t mangle -A RESTOREMARK -j CONNMARK --restore-mark
iptables -t mangle -A OUTPUT -p TCP -m state --state NEW -m owner --uid-owner 1001 -j TUNMARK
iptables -t mangle -A OUTPUT -p TCP -m state --state ESTABLISHED,RELATED -m owner --uid-owner 1001 -j RESTOREMARK
Where 1001 is the uid of that user.
But when I ssh with that user, I cannot use any kind of tools like ping, traceroute or mtr, because it seems just root can use them on an OpenWRT build:
ping: permission denied (are you root?)
How can I fix this without messing up the whole system or creat security leaks? Is there a better way doing this maybe?
(Last edited by knuddel on 1 Oct 2013, 20:40)
