Converting ipchains rules to iptables rules?

Converting ipchains rules to iptables rules?

Post by Ashok Aiy » Fri, 10 Aug 2001 22:29:47



Is there any convenient script available to convert ipchains rules
to iptables rules?

I am migrating my lab server (that runs linux 2.2.19/ipchains) to a
new server that runs linux 2.4.7.  The old server has a list of
ipchains rules that have worked quite well, and I would like the
new server to have these rules as well.  I realize I can use the
2.4.7 ipchains module and the old rules, but I would rather convert
to iptables, even if the conversion will be initially painful.

Thanks!
Ashok

 
 
 

Converting ipchains rules to iptables rules?

Post by Dean Thompso » Sat, 11 Aug 2001 00:09:19


Hi!,

Quote:> Is there any convenient script available to convert ipchains rules
> to iptables rules?

> I am migrating my lab server (that runs linux 2.2.19/ipchains) to a
> new server that runs linux 2.4.7.  The old server has a list of
> ipchains rules that have worked quite well, and I would like the
> new server to have these rules as well.  I realize I can use the
> 2.4.7 ipchains module and the old rules, but I would rather convert
> to iptables, even if the conversion will be initially painful.

The best thing I can suggest is finding a couple of HOWTO's on iptables and
taking a quick read through them.  Depending on what sort of ipchain
statements you have, you should be able to convert them into iptables without
too much of a delay.

See ya

Dean Thompson

--
+____________________________+____________________________________________+

| Bach. Computing (Hons)     | ICQ     - 45191180                         |
| PhD Student                | Office  - <Off-Campus>                     |
| School Comp.Sci & Soft.Eng | Phone   - +61 3 9903 2787 (Gen. Office)    |
| MONASH (Caulfield Campus)  | Fax     - +61 3 9903 1077                  |
| Melbourne, Australia       |                                            |
+----------------------------+--------------------------------------------+

 
 
 

Converting ipchains rules to iptables rules?

Post by Cory Syvenk » Sun, 12 Aug 2001 15:10:41




> The best thing I can suggest is finding a couple of HOWTO's on iptables
> and taking a quick read through them.

The goods are at: http://netfilter.samba.org/

cS

 
 
 

1. Converting ipchains rules to iptables!

Hello there!

I'm back.

For Nick and others,

I was trying to upgrade my ipchains rules to iptables ...

# Deny TCP and UDP packets to privileged ports
ipchains -A input -l -i $EXTIF -d $ANY 0:1023 -p udp -j DENY
ipchains -A input -l -i $EXTIF -d $ANY 0:1023 -p tcp -j DENY

now, you helped me with these where $EXTIF and $ANY is assigned with values.

# Deny TCP and UDP packets to privileged ports

iptables -A INPUT -p udp -i $EXTIF -d $ANY 0:1023 -p udp -j LOG
iptables -A INPUT -p udp -i $EXTIP -d $ANY 0:1023 -j DROP

iptables -A INPUT -p tcp -i $EXTIF -d $ANY 0:1023 -j LOG
iptables -A INPUT -p tcp -i $EXTIF -d $ANY 0:1023 -j DROP

Now, iptables says ...

Warning: wierd character in interface `-d' (No aliases, :, ! or *).
Bad argument `0-1023'

Why is this happening, please?

thanks in advance.

raqueeb hassan
bangladesh

2. Can't compile fetchmail...HELP!

3. Converting ipchains rules to iptables, please!

4. find newly modified files

5. iptables: rule with RETURN target just after a rule with ACCEPT target

6. encryption algorithm

7. iptables: rule with RETURN target after a rule with the ACCEPT target

8. length error installing RedHat 6.1 Alpha

9. Converting ipchains rules to ipfilter, please!

10. Looking for iptables applications code (iptables.c) to run some rules to forward packets

11. ipf.conf /ipf.rules/ ipnat.rules or conf

12. Jumpstart issue: Could not find matching rule in rules.ok

13. Operating System Sucks-Rules-O-Meter - Linux Rules,Rocks