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 6th March 2005, 10:52 PM
vakou Offline
Registered User
 
Join Date: Jan 2005
Posts: 33
iptables

hi
i want to know how i can disable the port 22 through ip tables not to accept connections

i try edit the iptables-config but finally i didnt make it

anyidea please

thanks
Reply With Quote
  #2  
Old 7th March 2005, 05:35 AM
vakou Offline
Registered User
 
Join Date: Jan 2005
Posts: 33
well what happend no one can help me
Reply With Quote
  #3  
Old 7th March 2005, 02:53 PM
Northern Offline
Registered User
 
Join Date: Nov 2004
Posts: 55
Try this

iptables -A INPUT -p tcp -s ! 127.0.0.1 --dport ssh -j DROP

This can be refined but it will work.
Reply With Quote
  #4  
Old 7th March 2005, 06:16 PM
vakou Offline
Registered User
 
Join Date: Jan 2005
Posts: 33
well in the iptables-config if i add only this rule not working

why

any idea please
Reply With Quote
  #5  
Old 7th March 2005, 06:34 PM
Northern Offline
Registered User
 
Join Date: Nov 2004
Posts: 55
Do 'iptables -F' to flush your current rules.

Then type in the command above.

Then do 'iptables-save > /etc/sysconfig/iptables'

Then do 'service iptables restart'

As long as your not using firestarter then the /etc/sysconfig/iptables script is what iptables reads at boot to set you iptables rules.

Then try to ssh onto your box from another.

You can view the current iptables rules with 'iptables -L'

Note, if you have any fancy iptables rules running this will remove them. You may want to do 'iptables-save > ~/iptables.orig' before you do anything.

Also, the /etc/init.d/iptables script is crap. You might want to edit this. For example I commented out lines 129 to 142 otherwise I'd always have a NAT chain, which I didnt want.

Hope that helps.
Reply With Quote
  #6  
Old 13th March 2005, 08:32 PM
w0nders Offline
Registered User
 
Join Date: Mar 2005
Location: Russian
Age: 29
Posts: 1
re

this semple blocked SSH(22port)
iptables -N SSH
iptables -A INPUT -p tcp --dport 22 -j SSH
iptables -A SSH -p tcp -d <YOUR_IP> --dport 22 -s <SOURCE_IP>-j ACCEPT
iptables -A SSH -p tcp -d <YOUR_IP> --dport 22 -j REJECT --reject-with tcp-reset
Reply With Quote
  #7  
Old 19th March 2005, 02:31 AM
GrahamB Offline
Registered User
 
Join Date: Mar 2005
Location: Windsor, On, Canada
Age: 63
Posts: 104
Arrow Try Firestarter

Quote:
Originally Posted by vakou
hi
i want to know how i can disable the port 22 through ip tables not to accept connections
i try edit the iptables-config but finally i didnt make it
anyidea please

thanks
Hi Vokou!

Try this thread: http://www.fedoraforum.org/forum/sho...265#post225265

The idea is that Firestarter is so easy to use. So quick. Very user friendly. You don't have to struggle with complex code.

Have fun.
__________________
Bye
GrahamB
Registered Linux User #390687

Config: FC 6, PC1=(dead!), PC2=(server, IDE drives, RTL-8139, Audigy LS), router=(RP614v2), DSL-modem.
Reply With Quote
Reply

Tags
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
GUI iptables "apply" differes from boot config - iptables config files load order? anocelot Security and Privacy 3 23rd August 2008 06:06 AM
FC8 iptables... crab_com Security and Privacy 3 5th December 2007 06:27 AM
command #service iptables save changed the original config of iptables kesavulur Security and Privacy 0 28th November 2007 06:33 AM
Iptables crab_com Servers & Networking 8 14th October 2006 03:13 PM
Problems In FC4 W/ Having to Type ./Iptables instead of Iptables eliminate Servers & Networking 2 17th January 2006 01:51 AM


Current GMT-time: 13:57 (Wednesday, 22-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