Discussion:
Configuring IP Tables
(too old to reply)
Max
2004-07-28 03:46:58 UTC
Permalink
Hi all,

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

***@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
Christoph Scheurer
2004-07-28 06:22:13 UTC
Permalink
On 27 Jul 2004 20:46:58 -0700
Post by Max
Hi all,
I would like to configure iptables to drop all SSH connections. I have
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

Loading...