Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > 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.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 20th May 2012, 08:39 PM
squogmaster Offline
Registered User
 
Join Date: May 2012
Location: UK
Posts: 7
windows_7firefox
iptables Fedora 16

Hi,

Am attempting to configure SSH on port 22 on Fedora 16.

2 things:

Have enabled port 22 in iptables:

-A INPUT -m state –state NEW -m tcp -p tcp –dport 22 -j ACCEPT

Now I can connect to port 22 but I had to reboot the PC for this to work - Can I not just restart or update iptables to enable this or do I have to restart every tine I make a change in iptables?

I tried 'systemctl restart iptable.service' BUT iptables is not a service (or is it??).

Also, I set 'root permissions' to NO in the sshd.config but can still login through ssh as root??

Stop and restarted the ssh.service but can stil login as root from remote PC??

any ideas?

Cheers,....

Last edited by squogmaster; 20th May 2012 at 08:43 PM.
Reply With Quote
  #2  
Old 21st May 2012, 10:22 AM
marriedto51 Offline
Registered User
 
Join Date: Jul 2009
Location: England, UK
Posts: 821
linuxfirefox
Re: iptables Fedora 16

If you edit the filtering rules with the command iptables then changes you make take effect immediately for the running system. But: they will be lost when you re-boot. To make the changes permanent, you need to save the current state with
Code:
iptables-save > /etc/sysconfig/iptables
It is probably a good idea to back up the old /etc/sysconfig/iptables first in case (like I would) you've made a mistake somewhere.

If you want to re-apply the saved rules you can use
Code:
systemctl restart iptables.service
Note also that all this only applies to IPv4 -- if you are using IPv6 you will need to replace iptables with ip6tables throughout.
Reply With Quote
  #3  
Old 21st May 2012, 03:02 PM
RHamel Online
Registered User
 
Join Date: Sep 2004
Location: Denver, Colorado
Posts: 547
linuxfirefox
Re: iptables Fedora 16

The order of the iptables commands matter. The -A switch means appends.
Reply With Quote
  #4  
Old 24th May 2012, 09:54 AM
ukkreddy Offline
Registered User
 
Join Date: May 2012
Location: Chennai
Posts: 8
windows_xp_2003ie
Re: iptables Fedora 16

Hi,

when we reboot Linux PC, we lost iptables rules.
if you want automaticlly add your rules, you can save rule in iptables-save file.
if you want to drop any type of packet "iptables -P INPUT DROP", then we can allow what you need.

and rule will check in order.

Last edited by ukkreddy; 24th May 2012 at 10:07 AM. Reason: given more information
Reply With Quote
Reply

Tags
fesora, iptables

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
"Applying iptables firewall rules: iptables-restore: line 20 failed" colt Using Fedora 0 24th February 2012 03:17 AM
iptables on Fedora 10 linux_ne Servers & Networking 5 28th May 2009 04:42 PM
command #service iptables save changed the original config of iptables kesavulur Security and Privacy 0 28th November 2007 06:33 AM
Problems In FC4 W/ Having to Type ./Iptables instead of Iptables eliminate Servers & Networking 2 17th January 2006 01:51 AM
iptables in fedora wiz561 Using Fedora 7 17th August 2004 10:25 PM


Current GMT-time: 18:15 (Saturday, 18-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

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