Iptables problem - unknown option "--dports"
Hello!
I am running an OpenVPN client on my Raspberry Pi, which is running Xbian, a variant of Debian. Currently all traffic goes through the VPN, but I'd like to set certain applications to use the regular network interface. After some googling it seemed the best solution was to use iptables. I've been trying to set port 7000,6697 and 9999 to only use eth0 but iptables isn't cooperating. When I do: Code:
sudo iptables -A PREROUTING -i eth0 -t mangle -p tcp --dports 7000,6697,9999 -j MARK --set-mark 1 Code:
iptables v1.4.18: unknown option "--dports" |
Load with "-m multiport" before using --dports"?
|
Thank you, that worked! The next step from the stackoverflow answer I'm following is:
Code:
echo "201 eth1.out" >> /etc/iproute2/rt_tables |
Quote:
Is the file, or the directory it resides in, made immutable ('man lsattr')? Else run Code:
strace -v /bin/echo 201 eth1.out >> /etc/iproute2/rt_tables |
When I run lsattr rt_tables I get:
Code:
-------------e-- rt_tables Code:
-bash: /etc/iproute2/rt_tables: Permission denied Edit2: I can run the command if I use sudo su to change to the root account. Just plain sudo doesn't work. |
Indeed odd. No idea why though as you didn't run the strace command as root.
|
I ran strace as root, the output is here if you'd like to take a look at it.
Meanwhile, I've done as instructed on stackoverflow and still cannot get specific ports to not go through the VPN. Iptables and iproute2 are quite difficult to understand for me. But I suppose that is for another thread, my original question has been answered. :) |
Thanks for the strace, didn't help though, no errors I can find. Quite stumped as it ain't about extended attributes either...
|
All times are GMT -5. The time now is 07:17 AM. |