Re: port based routing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/3/20 3:25 AM, ToddAndMargo via users wrote:
On 2020-08-02 16:03, Gordon Messmer wrote:

   firewall-cmd --permanent --direct --add-rule ipv4 raw OUTPUT 100 -p tcp -m tcp --dport 22 -j MARK –set-mark 0x1

Would you mind taking apart all the switches in the
above run string and expaining each of them?


firewall-cmd is only concerned with the first half of that command:

firewall-cmd --permanent --direct --add-rule ipv4 mangle OUTPUT 100

firewalld will "add" a rule to its "permanent" set, the rule will include flags passed "directly" to iptables.  The rule is for the "OUTPUT" chain in the "ipv4" "mangle" table.  If there are other direct rules, the priority "100" will be used when sorting them.

In my original email, I mistakenly suggested the "raw" table because I copy-pasted that from a rule that I use to avoid processing UDP DNS traffic through conntrack.  :)

The others are the arguments you would give to "iptables -A OUTPUT", which I took from the link in the original request:

    -p tcp -m tcp --dport 22 -j MARK –set-mark 0x1

Marking packets in this fashion is the mechanism for selecting which routing table will be used for the packet.  The packet is marked, the mark is processed by traffic rules, and the matching rule specifies a routing table.
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux