0

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

3 Answers3

2

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.

  • Adjust your ftp server configuration to not respond to some any reuqests execpt for the range you want to allow. I am pretty sure many of the more advanced ftp servers allow this.
  • Adjust the host-firewall rules on your ftp server to block inconing ftp connections except for the ranges you want to allow.
  • Update the firewall for your network
  • Use tcp-wrappers if available on your system. Basically you just have to unblock/block things in your hosts.allow and hosts.deny.
Linux Geek
  • 366
  • 2
  • 6
0

If you are using a typical ftpd launched from inetd, look into the tcp-wrappers package.

Jeffrey Hantin
  • 256
  • 1
  • 2
  • 6
0

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
Florin Andrei
  • 1,148
  • 1
  • 11
  • 18