NoCat mailing list submissions to:Fwd: NoCat Digest, Vol 13, Issue 1
mulopwe mulopwe <[email protected]>
| Newsgroups | gmane.network.nocat |
|---|---|
| Message-ID | <[email protected]> |
For my submission! Jeff ---------- Forwarded message ---------- From: [email protected] <[email protected]> Date: 5-sep-2005 21:03 Subject: NoCat Digest, Vol 13, Issue 1 To: [email protected] Send NoCat mailing list submissions to [email protected] To subscribe or unsubscribe via the World Wide Web, visit http://lists.nocat.net/mailman/listinfo/nocat or, via email, send a message with subject or body 'help' to [email protected] You can reach the person managing the list at [email protected] When replying, please edit your Subject line so it is more specific than "Re: Contents of NoCat digest..." Today's Topics: 1. iptables: can't set any ip address in rules (Salim) 2. Re: iptables: can't set any ip address in rules (Salim) 3. Re: iptables: can't set any ip address in rules (ulrich schwarz) 4. Re: iptables: can't set any ip address in rules (Salim) 5. Re: iptables: can't set any ip address in rules (Salim) ---------------------------------------------------------------------- Message: 1 Date: Mon, 5 Sep 2005 12:31:56 +0800 From: "Salim" <[email protected]> Subject: [NoCat] iptables: can't set any ip address in rules To: <[email protected]> Message-ID: <002c01c5b1d2$c219dad0$205f030a@askeyrd3> Content-Type: text/plain; charset="iso-8859-1" Hello all, I am not able to set any rule that contsin ip address in the iptables. For example I give this command >iptables -t -A PREROUTING -d 1.1.1.1 -j DNAT --to-destination 2.2.2.2 then, I issue the command >iptables -t nat -L. the result is Chain POSTROUTING (policy ACCEPT) target DNAT prot all opt -- source anywhere destination 0.0.0.0 to:0.0.0.0 I gave the command with verbose >iptables -v -t -A PREROUTING -d 1.1.1.1 -j DNAT --to-destination 2.2.2.2 it showed DNAT all opt -- in * out * 0.0.0.0/0 -> 0.0.0.0 to:0.0.0.0 for any command which has an ipaddress, the ip address always is always takes as 0.0.0.0 I am using Redhat Linux 2.4.25 iptables v1.3.3 MIPS embedded system. I am confused. Any help will be greatly appreciated. regards Salim ------------------------------ Message: 2 Date: Mon, 5 Sep 2005 15:02:44 +0800 From: "Salim" <[email protected]> Subject: Re: [NoCat] iptables: can't set any ip address in rules To: <[email protected]> Message-ID: <00ab01c5b1e7$d33a9240$205f030a@askeyrd3> Content-Type: text/plain; charset="iso-8859-1" I made some typing errors in the previous post, the corrected post is: Hello all, I am not able to set any rule that contain ip address in the iptables. For example I give this command >iptables -t nat -A PREROUTING -d 1.1.1.1 -j DNAT --to-destination 2.2.2.2 then, I issue the command >iptables -t nat -L. the result is Chain PREROUTING (policy ACCEPT) target DNAT prot all opt -- source anywhere destination 0.0.0.0 to:0.0.0.0 I gave the command with verbose >iptables -v -t nat -A PREROUTING -d 1.1.1.1 -j DNAT --to-destination 2.2.2.2 it showed DNAT all opt -- in * out * 0.0.0.0/0 -> 0.0.0.0 to:0.0.0.0 for any command which has an ipaddress, the ip address is always taken as 0.0.0.0 I am using Redhat Linux 2.4.25 iptables v1.3.3 MIPS embedded system. I am confused. Any help will be greatly appreciated. regards Salim ------------------------------ Message: 3 Date: Mon, 05 Sep 2005 09:02:38 +0200 From: ulrich schwarz <[email protected]> Subject: Re: [NoCat] iptables: can't set any ip address in rules To: Salim <[email protected]> Cc: [email protected] Message-ID: <[email protected]> Content-Type: text/plain; charset=ISO-8859-1 Salim wrote: > Hello all, > I am not able to set any rule that contsin ip address in the iptables. > For example I give this command > > >>iptables -t -A PREROUTING -d 1.1.1.1 -j DNAT --to-destination 2.2.2.2 hello salim, if you omit the table name after the -t parameter, AFAIK the filter table is assumed as default. in other words, the above statement gets interpreted as follows: iptables -t filter -A PREROUTING -d 1.1.1.1 -j DNAT --to-destination 2.2.2.2 unfortunately, there is no prerouting chain in the filter table, this chain only exists in the nat and mangle tables. i suppose the command you are looking for is: iptables -t nat -A PREROUTING -d 1.1.1.1 -j DNAT --to-destination 2.2.2.2 i always loved this page for such issues, especially the diagram that shows how packets travel through the chains and tables: http://iptables-tutorial.frozentux.net/iptables-tutorial.html#TRAVERSINGOFTABLES you can also try something simple like iptables -t filter -A INPUT -d 192.168.1.1 -j DROP iptables -L to see if your iptables work. [...] > I am using Redhat Linux 2.4.25 > iptables v1.3.3 > MIPS embedded system. > > I am confused. Any help will be greatly appreciated. > > regards > Salim HTH, regards, ulric ------------------------------ Message: 4 Date: Mon, 5 Sep 2005 15:19:56 +0800 From: "Salim" <[email protected]> Subject: Re: [NoCat] iptables: can't set any ip address in rules To: "ulrich schwarz" <[email protected]> Cc: [email protected] Message-ID: <00b601c5b1ea$3a7cd3d0$205f030a@askeyrd3> Content-Type: text/plain; charset="iso-8859-1" Hello Ulrich, thanks for the reply. actually that was a typo, I did include -t nat in my actual command. I corrected my post just now. I issued the command you gave, the result is same. >iptables -t filter -A INPUT 192.168.1.1 -j DROP and then >iptables -L it showed as Chain INPUT (Policy ACCEPT) target DROP prot all opt -- source anywhere destination 0.0.0.0 nothing in FORWARD and OUTPUT chains. regards Salim ----- Original Message ----- From: "ulrich schwarz" <[email protected]> To: "Salim" <[email protected]> Cc: <[email protected]> Sent: Monday, September 05, 2005 3:02 PM Subject: Re: [NoCat] iptables: can't set any ip address in rules > Salim wrote: > > > Hello all, > > I am not able to set any rule that contsin ip address in the iptables. > > For example I give this command > > > > > >>iptables -t -A PREROUTING -d 1.1.1.1 -j DNAT --to-destination 2.2.2.2 > > hello salim, > > if you omit the table name after the -t parameter, AFAIK the filter > table is assumed as default. in other words, the above statement gets > interpreted as follows: > > iptables -t filter -A PREROUTING -d 1.1.1.1 -j DNAT --to-destination 2.2.2.2 > > unfortunately, there is no prerouting chain in the filter table, this > chain only exists in the nat and mangle tables. > > i suppose the command you are looking for is: > > iptables -t nat -A PREROUTING -d 1.1.1.1 -j DNAT --to-destination 2.2.2.2 > > i always loved this page for such issues, especially the diagram that > shows how packets travel through the chains and tables: > > http://iptables-tutorial.frozentux.net/iptables-tutorial.html#TRAVERSINGOFTA BLES > > you can also try something simple like > > iptables -t filter -A INPUT -d 192.168.1.1 -j DROP > iptables -L > > to see if your iptables work. > > [...] > > I am using Redhat Linux 2.4.25 > > iptables v1.3.3 > > MIPS embedded system. > > > > I am confused. Any help will be greatly appreciated. > > > > regards > > Salim > > HTH, regards, > > ulric ------------------------------ Message: 5 Date: Mon, 5 Sep 2005 15:26:38 +0800 From: "Salim" <[email protected]> Subject: Re: [NoCat] iptables: can't set any ip address in rules To: "Salim" <[email protected]>, "ulrich schwarz" <[email protected]> Cc: [email protected] Message-ID: <00d001c5b1eb$39301310$205f030a@askeyrd3> Content-Type: text/plain; charset="iso-8859-1" again typo, sorry i cant cut and paste... the command was >iptables -t filter -A INPUT -d 192.168.1.1 -j DROP with result > Chain INPUT (Policy ACCEPT) > target DROP > prot all > opt -- > source anywhere > destination 0.0.0.0 ----- Original Message ----- From: "Salim" <[email protected]> To: "ulrich schwarz" <[email protected]> Cc: <[email protected]> Sent: Monday, September 05, 2005 3:19 PM Subject: Re: [NoCat] iptables: can't set any ip address in rules > Hello Ulrich, > thanks for the reply. > actually that was a typo, I did include -t nat in my actual command. I > corrected my post just now. > > I issued the command you gave, the result is same. > > >iptables -t filter -A INPUT 192.168.1.1 -j DROP > > and then > >iptables -L > > it showed as > > Chain INPUT (Policy ACCEPT) > target DROP > prot all > opt -- > source anywhere > destination 0.0.0.0 > > nothing in FORWARD and OUTPUT chains. > > regards > Salim > > ----- Original Message ----- > From: "ulrich schwarz" <[email protected]> > To: "Salim" <[email protected]> > Cc: <[email protected]> > Sent: Monday, September 05, 2005 3:02 PM > Subject: Re: [NoCat] iptables: can't set any ip address in rules > > > > Salim wrote: > > > > > Hello all, > > > I am not able to set any rule that contsin ip address in the > iptables. > > > For example I give this command > > > > > > > > >>iptables -t -A PREROUTING -d 1.1.1.1 -j DNAT --to-destination 2.2.2.2 > > > > hello salim, > > > > if you omit the table name after the -t parameter, AFAIK the filter > > table is assumed as default. in other words, the above statement gets > > interpreted as follows: > > > > iptables -t filter -A PREROUTING -d 1.1.1.1 -j DNAT --to-destination > 2.2.2.2 > > > > unfortunately, there is no prerouting chain in the filter table, this > > chain only exists in the nat and mangle tables. > > > > i suppose the command you are looking for is: > > > > iptables -t nat -A PREROUTING -d 1.1.1.1 -j DNAT --to-destination 2.2.2.2 > > > > i always loved this page for such issues, especially the diagram that > > shows how packets travel through the chains and tables: > > > > > http://iptables-tutorial.frozentux.net/iptables-tutorial.html#TRAVERSINGOFTA > BLES > > > > you can also try something simple like > > > > iptables -t filter -A INPUT -d 192.168.1.1 -j DROP > > iptables -L > > > > to see if your iptables work. > > > > [...] > > > I am using Redhat Linux 2.4.25 > > > iptables v1.3.3 > > > MIPS embedded system. > > > > > > I am confused. Any help will be greatly appreciated. > > > > > > regards > > > Salim > > > > HTH, regards, > > > > ulric > > > _______________________________________________ > NoCat mailing list > [email protected] > http://lists.nocat.net/mailman/listinfo/nocat ------------------------------ _______________________________________________ NoCat mailing list [email protected] http://lists.nocat.net/mailman/listinfo/nocat End of NoCat Digest, Vol 13, Issue 1 ************************************