Contents
Are there any other rules for iptables At present?
I have no other iptables rules at present (although I may create some rules to carry out unrelated tasks in the future). Also, the output of ip route is:
Is there a routing rule for iptables-VL?
Running iptables -vL confirms that the packets are getting matched by the marking rule, but they don’t appear to be following the routing rule. EDIT: I’ve spent a long time on this, and although it still doesn’t work, I think I’m a bit closer.
How to route HTTP traffic over tap0 interface?
For instance, if you only want to route outgoing HTTP traffic over the tap0 interface, change 465 to 80. To prevent the packets sent over tap0 getting your LAN address as source IP, use the following rule to change it to your interface address (assuming 10.0.0.2 as IP address for interface tap0 ):
Which is better iptables to route packet to specific?
Some suggest you to set it to 0, but 2 seems a better choice according to https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt. If you skip this, you will receive packets (this can be confirmed using tcpdump -i tap0 -n ), but packets do not get accepted.
Is the–PID-owner rule broken in Linux?
First, the –pid-owner criterion only matches the exact pid, meaning your program could easily spawn a child process which would not be blocked by this rule. (At least I haven’t read otherwise.) Secondly, iptables (8) warns that –pid-owner is broken on SMP systems (which may or may not apply to you, but in either case limits portability).
How to create iptables rule per process in Linux?
You could write a wrapper which forks first, then adds the rule and execs the process (assuming the program you’re running doesn’t fork again), since the PID is not changed by the exec (3) call. Add yourself to that group, so that you won’t be asked for a password to run processes with the primary group set to it: