Gentoo Archives: gentoo-user

From: Mick <michaelkintzios@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Change in iptables syntax fails to load rule
Date: Fri, 29 Mar 2013 23:53:05
Message-Id: 201303292352.30420.michaelkintzios@gmail.com
In Reply to: Re: [gentoo-user] Change in iptables syntax fails to load rule by Pandu Poluan
1 On Friday 29 Mar 2013 20:36:40 Pandu Poluan wrote:
2 > On Mar 30, 2013 2:54 AM, "Mick" <michaelkintzios@×××××.com> wrote:
3 > > Hi All,
4 > >
5 > > A few months ago I got some errors about the match option in some
6 > > iptables rules that I was running at the time. I modified these to
7 > > remove match
8 >
9 > and
10 >
11 > > add conntrack and all went well.
12 > >
13 > >
14 > > Now I am trying to run this:
15 > >
16 > > /sbin/iptables -t nat -A OUTPUT -v -p tcp --dport 1935 -j REDIRECT
17 > >
18 > > but it fails to load and it does not give me any particularly informative
19 > > message:
20 > >
21 > > # /sbin/iptables -t nat -A OUTPUT -v -p tcp --dport 1935 -j REDIRECT
22 > > REDIRECT tcp opt -- in * out * 0.0.0.0/0 -> 0.0.0.0/0 tcp dpt:1935
23 > >
24 > > # /sbin/iptables -L -v -n | grep 1935
25 > > #
26 > >
27 > > Any idea how I should rewrite this rule? I was using it to redirect the
28 > > output to rtmpsrv to capture the address of a rtmpe stream, but now it
29 > > does not work.
30 > > --
31 > > Regards,
32 > > Mick
33 >
34 > IIRC, iptables -L by default only dumps the "filter" table.
35 >
36 > Just use iptables-save and pipe the result through less (more info there;
37 > you can ensure that the rule gets inserted to the proper table and chain).
38
39 Hmm... the rule is saved, but searching for the port number does not bring up
40 anything, hence I assumed that it is not accepted.
41
42 Isn't a port number in this case '1935' interpreted as a search string on the
43 shell? Quotes don't work.
44
45 --
46 Regards,
47 Mick

Attachments

File name MIME type
signature.asc application/pgp-signature