Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-25-2009, 04:18 AM   #1
Registered: Apr 2009
Location: ~
Distribution: RHEL, Fedora
Posts: 381

Rep: Reputation: 58
iptables ssh block NIC4

I want to stop incoming ssh to NIC4 (i.e. eth3) and allow it any other interface.

How can I do this?
I am using following rule

-A INPUT -s 0/0 -i eth3 -p tcp --sport 1024:65535 --dport 22 -j DROP
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT

But unfortunately its not working.

Where I am wrong?
Old 08-25-2009, 09:07 AM   #2
LQ Newbie
Registered: Mar 2009
Posts: 26

Rep: Reputation: 1
I think you just can write the interfaces you want to listen to in /etc/ssh/sshd_config


block, ssh

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Block and allow with Iptables help! conrado Slackware 2 10-26-2007 11:31 AM
iptables-p2p - Instalation problems | How to block p2p with iptables Woping Linux - Networking 0 03-14-2006 01:56 PM
IPTables and PPTPD :S (to block or not to block) thewonka Linux - Networking 0 03-24-2005 07:58 PM
IPtables - Block all except what I allow ]SK[ Linux - Software 4 02-10-2005 07:14 AM
block putty.exe(ssh) with iptables jamiguel77 Linux - Networking 13 09-14-2004 11:13 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:15 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration