Configuring IP Tables

Configuring IP Tables

Post by Ma » Thu, 29 Jul 2004 12:46:58



Hi all,

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


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

 
 
 

Configuring IP Tables

Post by Christoph Scheure » Thu, 29 Jul 2004 15:22:13


On 27 Jul 2004 20:46:58 -0700


> Hi all,

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


> 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

 
 
 

1. configuring routing table + IP forwarding

Hi all,

I have two questions :

1)How can i configure my routing table without losing it when rebooting
?

I did all the stuff with route add -host  ..... so that i had a correct
routing table for my LAN, but when rebooting all my input lines where
gone.

2)Does someone know what i have to do to forward IP packets from one NIC
to another on the same computer ? I set IP forwarding to yes, what kind
of software do i have to install.

Thanks in advance

Patrik.

2. xanim for linux?

3. Configuring net (IP-tunnel, IP-Alias, Proxy-ARP, NAT, IP-Masq?)

4. Statistics library

5. ip tables vpn pptp and ip gre47

6. TCP/IP support & Linux

7. IP Chains / Ip Tables

8. ApacheJServ beginner question?

9. IP tables script, multiple IP's ?

10. IP Tables & IP Accounting

11. Going from IP chains to IP tables

12. Cannot FTP via IP MASQUERADE with IP tables

13. IP Tables v. IP Chains