I only want to be able to connect to my unix box via ftp from a small range of ips. other services (i.e., www , mail , ssh) should be from any ip as usual
how can i set this up?
thanks
You didn't say which type of unix, which ftp server or provide us with enough details to give you specific directions.
There are many ways general ways to do this.
If you are using a typical ftpd
launched from inetd
, look into the tcp-wrappers package.
What "unix" is that?
On Linux, for this sort of thing, I always use iptables - the built-in firewall.
iptables -A INPUT -s X.Y.Z.K/32 --dport 21 -j ACCEPT
iptables -A INPUT --dport 21 -j DROP