Networking Forums  

Go Back   Networking Forums > Networking Newsgroups > Linux Networking

Configuring IP Tables

Reply
 
Thread Tools Display Modes
  #1  
Old 07-28-2004, 04:46 AM
Default Configuring IP Tables



Hi all,

I would like to configure iptables to drop all SSH connections. I have
the following rules set up:

root@lastochka max # iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
DROP tcp -- anywhere anywhere tcp
spt:ssh
DROP udp -- anywhere anywhere udp
spt:ssh

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

However, launching an SSH program on another computer and attempting
to connect lets me through.

Can someone tell me what I'm doing wrong?
Thanks in advance,
Max


Max
Reply With Quote
  #2  
Old 07-28-2004, 07:22 AM
Christoph Scheurer
Guest
 
Posts: n/a
Default Re: Configuring IP Tables

On 27 Jul 2004 20:46:58 -0700
(E-Mail Removed) (Max) wrote:

> Hi all,
>
> I would like to configure iptables to drop all SSH connections. I have
> the following rules set up:
>
> root@lastochka max # iptables -L
> Chain INPUT (policy ACCEPT)
> target prot opt source destination
> DROP tcp -- anywhere anywhere tcp
> spt:ssh
> DROP udp -- anywhere anywhere udp
> spt:ssh
>
> Chain FORWARD (policy ACCEPT)
> target prot opt source destination
>
> Chain OUTPUT (policy ACCEPT)
> target prot opt source destination
>
> However, launching an SSH program on another computer and attempting
> to connect lets me through.
>
> Can someone tell me what I'm doing wrong?
> Thanks in advance,
> Max

you have to change --sport 22 to --dport 22

then it will work

Greets
Chris


Reply With Quote
Reply

Tags
configuring, tables

Thread Tools
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


All times are GMT. The time now is 04:18 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.