Sponsored Content
Top Forums UNIX for Advanced & Expert Users Multi-table iptables Question Post 302911816 by knightfirefx on Sunday 3rd of August 2014 03:18:29 PM
Old 08-03-2014
Multi-table iptables Question

I have a question regarding IPTables packet flow, that I am hoping I can get an answer to.

We have a fairly advanced implementation of IPTables that I am trying to convert into a third party product and I am not quite certain on the packet flow in the current IPTables implementation.

We are using Mangle, NAT and Filter tables - and my question is this:

We have a PREROUTING chain defined in Mangle AND NAT tables. If a rule is matched with a -j of ACCEPT in the Mangle PREROUTING chain, does the packet still flow to the NAT PREROUTING chain? Or does it just go to the FORWARD chain and skip any other PREROUTING chains in other tables?

That is the missing piece of logic in my head and I would love to have that answered, thank you.
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

multi-network question

Hi, I have a linux machine connected to 2 networks, with devices eth0 and eth1. When I give the command host whatever, how do I now which network is searched for the DNS's ? Is there a default ethernet device for network related commands ? How do I change it ? :confused: (2 Replies)
Discussion started by: mik
2 Replies

2. Programming

Question About Multi-Processed Applications... fork()

Assume we have an application built on *nix that uses fork()...then the processes procedure is going to act as follow: X is considered a parent process (first click on application) Y is considered a child process of X (second click on application) Z is considered a child process of Y (third... (6 Replies)
Discussion started by: f.ben.isaac
6 Replies

3. Red Hat

routing table question

I have below routing table in linux kernel 2.6.9 # netstat -rn Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 10.155.24.0 0.0.0.0 255.255.252.0 U 0 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U ... (5 Replies)
Discussion started by: chuikingman
5 Replies

4. IP Networking

DHCP Server on Vxworks multi interface question

Hi, We currently operate a DHCP Server on Vxworks system. It seems that the server is functioning only over the boot interface. While trying to use it on a different interface the DHCP client messages seems to reach the interface but stay without response. From a... (1 Reply)
Discussion started by: zohara
1 Replies

5. UNIX for Advanced & Expert Users

[SOLVED] No INPUT chain on nat table in iptables

Hello, I'm having problem with an iptables rule. It seems that on one of two systems on the nat table, the INPUT chain doesn't exist for some strange reason. I get the error below: # iptables -t nat -A INPUT -j ACCEPT iptables: No chain/target/match by that name. Here is my kernel on... (0 Replies)
Discussion started by: Narnie
0 Replies

6. Shell Programming and Scripting

How to substract selective values in multi row, multi column file (using awk or sed?)

Hi, I have a problem where I need to make this input: nameRow1a,text1a,text2a,floatValue1a,FloatValue2a,...,floatValue140a nameRow1b,text1b,text2b,floatValue1b,FloatValue2b,...,floatValue140b look like this output: nameRow1a,text1b,text2a,(floatValue1a - floatValue1b),(floatValue2a -... (4 Replies)
Discussion started by: nricardo
4 Replies

7. Shell Programming and Scripting

Xml multi parse question

awk -F "" '/<Id>|<id>|<Source>|<source>|<Accession>|<accession>|<TestName>|<testname>/ {print $2, $3}' OFS='\t' Test.xml The above code works great, but lets say I wanted the <Analyte> name (<Name>STAT3). The word <name> is unique so there will be multiple records pulled. Is there a way to... (8 Replies)
Discussion started by: cmccabe
8 Replies

8. Programming

Multi head/multi window hello world

I am trying to write a large X app. I have successfully modified my xorg.conf to setup 4 monitors on an NVIDIA Quatro5200. I am trying to modify a simple hello world application to open a window on three of the four monitors. depending on the changes to loop the window creation section and event... (2 Replies)
Discussion started by: advorak
2 Replies
FIREWALLD.DIRECT(5)						 firewalld.direct					       FIREWALLD.DIRECT(5)

NAME
firewalld.direct - firewalld direct configuration file SYNOPSIS
/etc/firewalld/direct.xml DESCRIPTION
A firewalld direct configuration file contains the information about permanent direct chains and rules. These are the chains, rules and passthrough ... This is the structure of a direct configuration file: <?xml version="1.0" encoding="utf-8"?> <direct> [ <chain ipv="ipv4|ipv6" table="table" chain="chain"/> ] [ <rule ipv="ipv4|ipv6" table="table" chain="chain" priority="priority"> args </rule> ] [ <passthrough ipv="ipv4|ipv6"> args </passthrough> ] </direct> direct The mandatory direct start and end tag defines the direct. This tag can only be used once in a direct configuration file. There are no attributes for direct. chain Is an optional empty-element tag and can be used several times. It can be used to define names for additional chains. A chain entry has exactly three attributes: ipv="ipv4|ipv6" The IP family where the chain will be created. This can be either ipv4 or ipv6. table="table" The table name where the chain will be created. This can be one of the tables that can be used for iptables or ip6tables. For the possible values, please have a look at the TABLES section in the iptables man pages: For ipv="ipv4" in iptables(8), for ipv="ipv6" in ip6tables(8). chain="chain" The name of the chain, that will be created. Please make sure that there is no other chain with this name already. Please remember to add a rule or passthrough rule with an --jump or --goto option to connect the chain to another one. rule Is an optional element tag and can be used several times. It can be used to add rules to a built-in or added chain. A rule entry has exactly four attributes: ipv="ipv4|ipv6" The IP family where the rule will be added. This can be either ipv4 or ipv6. table="table" The table name where the chain will be created. This can be one of the tables that casn be used for iptables or ip6tables. For the possible values, please have a look at the TABLES section in the iptables man pages: For ipv="ipv4" in iptables(8), for ipv="ipv6" in ip6tables(8). chain="chain" The name of the chain where the rule will be added. This can be either a built-in chain or a chain that has been created with the chain tag. priority="priority" The priority is used to order rules. Priority 0 means add rule on top of the chain, with a higher priority the rule will be added further down. Rules with the same priority are on the same level and the order of these rules is not fixed and may change. If you want to make sure that a rule will be added after another one, use a low priority for the first and a higher for the following. The args can be any arguments of iptables or ip6tables, that do not conflict with the table or chain attributes. If the chain name is a built-in chain, then the rule will be added to chain_direct, else the supplied chain name is used. chain_direct is created internally for all built-in chains to make sure that the added rules do not conflict with the rules created by firewalld. passthrough Is an optional element tag and can be used several times. It can be used to add rules to a built-in or added chain. A rule entry has exactly one attribute: ipv="ipv4|ipv6" The IP family where the passthrough rule will be added. This can be either ipv4 or ipv6. The args can be any arguments of iptables or ip6tables. The passthrough rule will be added to the chain directly. There is no mechanism like for the direct rule above. The user of the passthrough rule has to make sure that there will be no conflict with the rules created by firewalld. EXAMPLE
Blacklisting of the networks 192.168.1.0/24 and 192.168.5.0/24 with logging and dropping early in the raw table: <?xml version="1.0" encoding="utf-8"?> <direct> <chain ipv="ipv4" table="raw" chain="blacklist"/> <rule ipv="ipv4" table="raw" chain="PREROUTING" priority="0">-s 192.168.1.0/24 -j blacklist</rule> <rule ipv="ipv4" table="raw" chain="PREROUTING" priority="1">-s 192.168.5.0/24 -j blacklist</rule> <rule ipv="ipv4" table="raw" chain="blacklist" priority="0">-m limit --limit 1/min -j LOG --log-prefix "blacklisted: "</rule> <rule ipv="ipv4" table="raw" chain="blacklist" priority="1">-j DROP</rule> </direct> SEE ALSO
firewall-applet(1), firewalld(1), firewall-cmd(1), firewall-config(1), firewalld.conf(5), firewalld.direct(5), firewalld.icmptype(5), firewalld.lockdown-whitelist(5), firewall-offline-cmd(1), firewalld.richlanguage(5), firewalld.service(5), firewalld.zone(5), firewalld.zones(5) NOTES
firewalld home page at fedorahosted.org: http://fedorahosted.org/firewalld/ More documentation with examples: http://fedoraproject.org/wiki/FirewallD AUTHORS
Thomas Woerner <twoerner@redhat.com> Developer Jiri Popelka <jpopelka@redhat.com> Developer firewalld 0.3.9 FIREWALLD.DIRECT(5)
All times are GMT -4. The time now is 01:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy