Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
All I get is
Code:
iptables v1.4.18: unknown option "--dports"
I've tried recompiling from the latest tarballs but there was no difference. Any ideas what I could do?
Thank you, that worked! The next step from the stackoverflow answer I'm following is:
Code:
echo "201 eth1.out" >> /etc/iproute2/rt_tables
but when I do that bash says permission denied even if I run it as root. Can I just edit rt_tables manually with nano instead or is there another command?
(..) when I do that bash says permission denied even if I run it as root. Can I just edit rt_tables manually with nano instead or is there another command?
Different questions different threads as far as I'm concerned. For me the command worked so the question isn't (or shouldn't be) what's the workaround but why it doesn't work. Does the file, or the directory it resides in, exist?
Is the file, or the directory it resides in, made immutable ('man lsattr')?
Else run
Edit: I can edit it just fine with nano. Strange.
Edit2: I can run the command if I use sudo su to change to the root account. Just plain sudo doesn't work.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.