LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices

Reply
 
Search this Thread
Old 08-25-2009, 03:18 AM   #1
PMP
Member
 
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, 08:07 AM   #2
mfons
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
 
  


Reply

Tags
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 10:31 AM
iptables-p2p - Instalation problems | How to block p2p with iptables Woping Linux - Networking 0 03-14-2006 12:56 PM
IPTables and PPTPD :S (to block or not to block) thewonka Linux - Networking 0 03-24-2005 06:58 PM
IPtables - Block all except what I allow ]SK[ Linux - Software 4 02-10-2005 06:14 AM
block putty.exe(ssh) with iptables jamiguel77 Linux - Networking 13 09-14-2004 10:13 AM


All times are GMT -5. The time now is 04:58 PM.

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