LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-30-2007, 02:55 AM   #1
GSMD
Member
 
Registered: Dec 2005
Distribution: Gentoo
Posts: 87

Rep: Reputation: 16
CONFIG_NETFILTER_XT_TARGET_CONNMARK vs CONFIG_NETFILTER_XT_MATCH_CONNMARK


These are the options from kernel config file. I'm just curious what's the difference between them as the first one is not set and I'm getting
Code:
# iptables -A POSTROUTING -t mangle -j CONNMARK --restore-mark
iptables: No chain/target/match by that name
TIA.

Last edited by acid_kewpie; 05-30-2007 at 02:57 AM.
 
Old 05-30-2007, 04:45 AM   #2
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Check out /proc/net/ip_tables_names for a list of a tables iptables got. You can get more tables with certain kernel-modules like nat. Look in /lib/modules/2.4.33.3/kernel/net/ipv6/netfilter/ for some modules to use with netfilter. Adjust your kernel version in last path.
 
Old 05-30-2007, 05:48 AM   #3
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 48
A TARGET is the -j TARGET piece, and a MATCH is the -p MATCH piece.

So a MATCH compares your rule with the packets, to see which packets to operate on,
and a TARGET changes the packets with what you specify..

Your error "iptables: No chain/target/match by that name" has 3 parts.
Either you don't have a mangle POSTROUTING chain; (unlikely in a standard Ubuntu kernel), or
You don't have a match that exists; (unlikely as you don't specify any matches in your rule), so
You don't have a CONNMARK TARGET; (which you say it is not set in the kernel config.)

You can set it, but you will need to create a custom kernel and custom initrd from patched kernel sources, and then test that it works ok. Not recommended for the novice user.

CONNMARK is mostly used for bandwidth control (QOS), so if it's not required, nothing is lost by not having it.
 
Old 05-30-2007, 09:24 AM   #4
GSMD
Member
 
Registered: Dec 2005
Distribution: Gentoo
Posts: 87

Original Poster
Rep: Reputation: 16
Thanks, guys. I obviously need connmark for multipath routing. What I did is recompiled the kernel with CONFIG_NETFILTER_XT_TARGET_CONNMARK=m (and applied patches by Julian Anastasov so far) and for now that iptables rule doesn't throw an error.
But the question still remains as I want to get an idea on how do those two differ.
 
Old 05-31-2007, 07:13 AM   #5
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 48
So a MATCH compares your rule with the packets, to see which packets to operate on,(choosing packets)

and a TARGET changes the packets with what you specify.. (changing packets)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration