Networking Forums

Networking Forums > Computer Networking > Linux Networking > For Iptables configuration file

Reply
Thread Tools Display Modes

For Iptables configuration file

 
 
KalarGyi@googlemail.com
Guest
Posts: n/a

 
      03-23-2006, 07:20 AM
Dear UNIX Masters

I would like to inform to you.I cannot configure
/etc/sysconfig/iptables file for NAT .I not want to use scripts file i
want to use only configuration file.I already using platform is Linux
Redhat 9.I really want to know this solving.Please kindly help me.

Best Regards;

Rajar

 
Reply With Quote
 
 
 
 
X
Guest
Posts: n/a

 
      03-23-2006, 08:01 PM
The best way to use that configuration file is to type in your rules,
make sure they work, then run iptables-save to the config file, e.g.:

iptables -P INPUT DROP
iptables -P OUTPUT ACCEPT
....
....
....
iptables-save > /etc/sysconfig/iptables

The iptables-save command generates the rules for the config file.

X

 
Reply With Quote
 
Rajar
Guest
Posts: n/a

 
      03-24-2006, 05:10 AM

X wrote:
> The best way to use that configuration file is to type in your rules,
> make sure they work, then run iptables-save to the config file, e.g.:
>
> iptables -P INPUT DROP
> iptables -P OUTPUT ACCEPT
> ...
> ...
> ...
> iptables-save > /etc/sysconfig/iptables
>
> The iptables-save command generates the rules for the config file.
>
> X


Master X please give me complete configuration file

Thankz
Rajar

 
Reply With Quote
 
X
Guest
Posts: n/a

 
      03-24-2006, 07:57 PM
A config file looks something like the following:

# Generated by iptables-save v1.3.5 on Fri Mar 24 14:55:12 2006
*nat
:PREROUTING ACCEPT [88564:7113421]
:POSTROUTING ACCEPT [2:120]
:OUTPUT ACCEPT [770:58462]
-A POSTROUTING -o eth1 -j SNAT --to-source 72.242.168.10
-A POSTROUTING -o eth0 -j SNAT --to-source 192.168.0.20
COMMIT
# Completed on Fri Mar 24 14:55:12 2006
# Generated by iptables-save v1.3.5 on Fri Mar 24 14:55:12 2006
*filter
:INPUT DROP [20493:2156974]
:FORWARD ACCEPT [2048290:1233736525]
:OUTPUT ACCEPT [1523:1024626]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -i ! eth1 -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j
ACCEPT
COMMIT
# Completed on Fri Mar 24 14:55:12 2006

X

P.S. I got rid of the RH-specific chains.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
IPTables configuration for SSH David Linux Networking 2 06-06-2007 08:59 AM
Some nat configuration problem with iptables. ChaoZhang Linux Networking 0 11-26-2006 08:20 AM
iptables for IPSec (Cisco VPN) - where can I find a sample configuration? arabub Linux Networking 0 09-24-2003 04:52 PM
iptables for IPSec (Cisco VPN) - where can I find a sample configuration? arabub Linux Networking 0 09-07-2003 04:14 AM
AIM Express, squid, iptables configuration Mike Linux Networking 1 07-05-2003 03:34 PM



1 2 3 4 5 6 7 8 9 10 11