[ale] IPTABLES

JK jknapka at kneuro.net
Fri Mar 9 16:30:17 EST 2007


Paul Cartwright wrote:

> I was tring to move a file from my desktop to my laptop using winscp.
> It wouldn't connect to my desktop. ( desktop running SUSE 10.2 ). SO I started 
> firestarter and then I could connect. What do I have to do to get that 
> connection without having  to start firestarter?
> man iptables scared me..
> what I want to do is add an incoming rule from my laptop to my SUSE desktop to 
> allow winscp using port 22 to access my desktop.
> command line??
> iptables --append INBOUND ??????
> 

iptables -I INPUT -s <laptop-ip> -p TCP --dport 22 -j ACCEPT

Of course, you must replace <laptop-ip> with the IP address
of your laptop.

Breakdown:

-I             = insert at the beginning
INPUT          = of the INPUT chain the following rule:
-s <laptop-ip> = when the source address is <laptop-ip>
-p TCP         = and the protocol is TCP/IP
--dport 22     = and the destination port is 22 (SSH)
-j ACCEPT      = then jump to the ACCEPT action.

-- JK




More information about the Ale mailing list