--- On Thu, 11/20/08, Christopher K. Johnson <ckjohnson@xxxxxxx> wrote: > From: Christopher K. Johnson <ckjohnson@xxxxxxx> > Subject: Re: set up NAT (network address translation) on local server > To: olivares14031@xxxxxxxxx, "Community assistance, encouragement, and advice for using Fedora." <fedora-list@xxxxxxxxxx> > Date: Thursday, November 20, 2008, 7:28 AM > I would add the *nat through COMMIT before the existing > *filter line. > > I don't believe it matters as long as you do not mix > them together. But usually the *nat is much briefer than > *filter, thus a good convention to put it first to find > easily later. > > Antonio Olivares wrote: > > It seems that it does not contain those lines :( > > > > I will need to edit the file manually and save it. > Then try it again. > > > > Regards, > > > > Antonio > > > -- "A society grows great when old men plant trees > whose shade they know > they shall never sit in" - Greek Proverb How can I fix this? I manually edited the file and I stopped service and now I get : [root@localhost ~]# gedit /etc/sysconfig/iptables & [1] 7697 [root@localhost ~]# service iptables stop iptables: Flushing firewall rules: [ OK ] iptables: Setting chains to policy ACCEPT: nat filter [ OK ] iptables: Unloading modules: [ OK ] [1]+ Done gedit /etc/sysconfig/iptables [root@localhost ~]# service iptables restart iptables: Flushing firewall rules: [ OK ] iptables: Setting chains to policy ACCEPT: filter [ OK ] iptables: Unloading modules: [ OK ] iptables: Applying firewall rules: Bad argument `COMMIT' Error occurred at line: 6 Try `iptables-restore -h' or 'iptables-restore --help' for more information. [FAILED] [root@localhost ~]# cat /etc/sysconfig/iptables *nat :PREROUTING ACCEPT [1:233] :POSTROUTING ACCEPT [0:0] :OUTPUT ACCEPT [0:0] -A POSTROUTING -s 192.168.1.0/24 -o eth0 -j SNAT --to-source 10.154.19.210 COMMIT -A FORWARD -i eth1 -o eth0 -j ACCEPT -A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT # manually added the changes 2008/11/20 # Firewall configuration written by system-config-securitylevel # Manual customization of this file is not recommended. *filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] :RH-Firewall-1-INPUT - [0:0] -A INPUT -j RH-Firewall-1-INPUT -A RH-Firewall-1-INPUT -i lo -j ACCEPT -A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT -A RH-Firewall-1-INPUT -p 50 -j ACCEPT -A RH-Firewall-1-INPUT -p 51 -j ACCEPT -A RH-Firewall-1-INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT -A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT -A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT -A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT -A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited -A FORWARD -j REJECT --reject-with icmp-host-prohibited COMMIT [root@localhost ~]# Thanks, Antonio -- fedora-list mailing list fedora-list@xxxxxxxxxx To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines