[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
howtos:misc:network_policy_based_routing [2018/03/09 09:40 (UTC)] – lamerix | howtos:misc:network_policy_based_routing [2018/03/09 22:24 (UTC)] (current) – [ip rule] lamerix | ||
---|---|---|---|
Line 18: | Line 18: | ||
By default the file should look something like this: | By default the file should look something like this: | ||
- | < | + | < |
# | # | ||
# reserved values | # reserved values | ||
Line 60: | Line 60: | ||
====== ip rule ====== | ====== ip rule ====== | ||
- | Full list of the possible parameters you can get from the [[http:// | + | Full list of the possible parameters you can get from the [[http:// |
- | You can combine ip-rule with fwmark that you can set with iptables, so can create an ip rule with every match iptables is capable of. | + | You can combine ip-rule with fwmark that you can set with iptables, so can create an ip rule with every match iptables is capable of. \\ |
- | When using in combination with iptables | + | If you notice any packets getting lost, make sure to enable |
+ | < | ||
+ | net.ipv4.conf.default.log_martians=1 | ||
+ | net.ipv4.conf.all.log_martians=1 | ||
+ | </ | ||
+ | If you notice any martian packets getting logged/ | ||
+ | < | ||
+ | net.ipv4.conf.default.rp_filter=0 | ||
+ | </ | ||
+ | |||
+ | ====== iptables mark ====== | ||
+ | |||
+ | Simply use -j MARK --set-mark < | ||
+ | * For incoming packages use -t mangle -A PREROUTING | ||
+ | * For outgoing packages -t mangle -A OUTPUT. | ||