Network Blog

Network Blog – Tech Blog

Last update in Monday, February 6th 2012
Stay update with this site articles
  • Home
  • About
  • Advertising
  • Archieve
  • Contact
  • Sitemap

APF Deny ALL for SSH – Limit IP Connections

Posted by admin in Friday, September 5th 2008   
Topics: Firewall
Tags: APF_Firewall
No Comment

APF firewall can deny ALL connections for ssh and allow only a single or select few of IPs to connect to your server. We’ll guide you through DENY ALL with APF firewall.

PROBLEM:
You want to deny all IPs to connect to shell/ssh on you server but only allow a select one or few to connect with APF firewall.

APF_Firewall

APF SOLUTION:
1) Login to your server as the root user.

2) cd /etc/apf

3) Use vi or nano to edit the /etc/apf/allow_hosts.rules file
EG: vi /etc/apf/allow_hosts.rules

4) Scroll down until after their last comment with the ##

Add the following in:

tcp:in:d=22:s=YOURHOMEIPHERE
out:d=22:d=YOURHOMEIPHERE

The d=22 part is the port, so you can repeat for other services as well to limit connections if you like.

Save the changes.

5) Edit the /etc/apf/deny_hosts.rules  file
EG: vi /etc/apf/deny_hosts.rules

Scroll down until the last default comment ## then below it add the following:

tcp:in:d=22:s=0/0

out:d=22:d=0/0
6) Restart APF firewall
apf -r

 

Popularity: 8% [?]

Related Post

  • How to install KISS Firewall ( Linux )
  • Firewall
  • APF (Advanced Policy Firewall) For Linux

Spread the word

Digg this post

Bookmark to delicious

Stumble the post

Add to your technorati favourite

Subscribes to this post

Leave Your Comments Below

« Zimbra to offer Ubuntu Linux support
Cisco CCNA Exam Tutorial »
  • Categories

    • Adverts
    • Anti-Virus
    • Apple
    • Blogging
    • Browser
    • Computer
    • Email
    • Firefox
    • Firewall
    • Gadgets
    • Hacking
    • Internet
    • iPhone
    • iPod
    • Linux
    • Mac
    • Microsoft
    • Notebook
    • Open Source
    • Security
    • Softwares
    • Sony
    • Storage
    • Technology
    • Uncategorized
    • VoIP
  • Blogroll

    • Asia SEO
    • Fashion Blog
    • Web Hosting
  • Pages

    • About
    • Advertising
    • Archieve
    • Contact
    • Sitemap
  • Follow Me On Twitter

    Follow Me on Twitter

Recent Articles

  • Partition Recovery
  • Google caffeine Update !
  • Singapore Domain Registration Tips
  • Free Blogger Templates Designer Themes
  • Music to Your Ears: The New Sony Ericsson Zylo
  • Remanufactured HP C1816A Premium Ink Cartridge
  • What you need to know about Facebook security
  • Best Web Host A Silent Partner
  • Online phone cards
  • Google Pagerank Update (30/Dec/2009 ) !

Most Popular

  • What is S/PDIF?
  • Valuing Network Certifications : Cisco ( CCNA/CCNP ) - Microsoft Certified ( MCSE / MCSA )
  • APF (Advanced Policy Firewall) For Linux
  • There are many positives with VoIP
  • Online phone cards
  • Link Load Balancing
  • Samsung Finesse SCH-R810 Mobile Phone
  • Cisco CCNA / CCNP / BCMSN Exam Review
  • Define Radius Server
  • Best Web Host A Silent Partner

Popular Tags

  • 4004+Chip Advertising+online Anti+Virus APF_Firewall Apple Blogging CCNA Cisco+Exam+Tutorial Computer Dual+Core+Qua+Core ERP+Software Fiber+Cables Firefox Firewall Gadgets Google+chrome Google+Lively Hacking Hyper-V+Windows+Server Internet Internet+Security iPhone iPod IT+Risk+Management Kiss+Firewall Life+Book+P8010 Linux Linux+Desktop Mac MacBook+Pro Microsoft Mobile+Blogging Notebook Open+Source Reciprocal+links SAS+70 Sony Sony+Laptop+TZ SQL+Server+2008 Storage Storage+Software+Memory The+AMUG+Mac+Pro URL+shorteners VoIP Zimbra+Ubuntu+Linux

Recent Feedbacks

  • grigzrh: When you have to renew it, you will go thru hell. My cousin have been trying to renew since dec 2009 and...
  • Larry: I bought my Samsung Finesse through Straight Talk which is far better than MetroPCS because Straight Talk runs...
  • samramirez: I have been using Dish Network for months now and I am satisfied with their service so far. Im glad I...
  • Takashi: What a lovely article ! Thank you. Takashi.
  • Sam: What would you recommend kiss orApf and why ? Thanks. Sam.

Most Commented

  • APF (Advanced Policy Firewall) For Linux  (1)
  • How to install KISS Firewall ( Linux ) (1)
  • Google Launches Virtual World Called 'Lively'  (1)
  • Dish Network – The Way To See The World (1)
  • Samsung Finesse SCH-R810 Mobile Phone (1)
  • Magic Jack Review (1)

Live Traffic

Subscribes

  • stumble
  • technorati add aol netvibes rojo myyahoo modern freedictionary subrss chicklet plusmo newsburst ngsub wwgthis subscribes
©2007-2012 Network Blog
Sponser By Web Hosting Blog Copy Protected

feeds

Valid XHTML   |   Valid CSS