Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 21/22/23 > Security and Privacy
FedoraForum Search

Forgot Password? Join Us!

Security and Privacy Sadly, malware, spyware, hackers and privacy threats abound in today's world. Let's be paranoid and secure our penguins, and slam the doors on privacy exploits.

Thread Tools Search this Thread Display Modes
Old 22nd February 2008, 10:50 AM
mattywix Offline
Registered User
Join Date: Dec 2007
Posts: 110
/etc/sysconfig/iptables how to set -t nat -A POSTROUTING ?

How can I add the following in /etc/sysconfig/iptables ? The format of the file doesnt seem to allow this...
/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
echo "1"> /proc/sys/net/ipv4/ip_forward

"For once you have tasted flight you will walk the earth with your eyes turned skywards, for there you have been and there you will long to return." - Leonardo da Vinci speaks of his joy at experiencing Linux
Reply With Quote
Old 23rd February 2008, 03:11 AM
nucleo Offline
Registered User
Join Date: Jan 2008
Posts: 101
service iptables save
saves the output of iptables-save to /etc/sysconfig/iptables
net.ipv4.ip_forward = 1
in the file /etc/sysctl.conf enables forwarding
Reply With Quote
Old 20th April 2012, 10:02 AM
joseCuervo Offline
Registered User
Join Date: Apr 2012
Location: Seoul, Korea
Posts: 1
Re: /etc/sysconfig/iptables how to set -t nat -A POSTROUTING ?

My laptop is on the LAN (with address of and it can ping but it cannot ping www.google.com
I want to use p1p1 (a.k.a. eth1) as and route everything from through eth0 to access internet but cannot figure out how to add simple NAT commands to iptables script ...


on Fedora release 16 (Verne)................ there is no "service iptables save" command (the original post is old from 2008)

[root@ezcorean sysconfig]# service iptables save
Redirecting to /bin/systemctl  save iptables.service
Unknown operation save
[root@ezcorean sysconfig]#
I have enabled

# Controls IP packet forwarding
net.ipv4.ip_forward = 1
in /etc/sysctl.conf

however, I still do not know how to add the rule
to /etc/sysconfig/iptables

If I do so, /var/log/messages says:

"Line 13 seems to have a -t table option." and it fails to start iptables.

However, if I run
/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
I can access the internet from my laptop as described above.

I suppose I should just add
/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
to /etc/rc.local ??

Last edited by joseCuervo; 20th April 2012 at 10:26 AM.
Reply With Quote

nat, postrouting, set

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
/etc/sysconfig/iptables being overwritten bart3005 Using Fedora 0 5th June 2008 02:43 PM
Why can't I see my PCMCIA in /etc/sysconfig/ ramow Hardware & Laptops 0 12th June 2007 06:29 AM
/etc/sysconfig/pm isn't working high Hardware & Laptops 2 2nd August 2006 09:37 PM
/etc/sysconfig/harddisks on FC5? Hesse EOL (End Of Life) Versions 5 7th June 2006 08:57 AM
about prerouting and postrouting veeraafed Servers & Networking 1 18th May 2005 09:22 PM

Current GMT-time: 03:25 (Sunday, 29-11-2015)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat