Archive for October, 2007

Even I dunno him exactly, i just know him from the openbsd journal ( http://undeadly.org ) but i feel i know about this guy. He helped openbsd with his knowledge about IPv6. Best known in his role as IPV6 KAME project core researcher. Thanks for everything, we’ll always remember you. Rest In Peace itojun

More

Install FTP @ OpenBSD

Setting up anonymous FTP Service

So easy working with OpenBSD, you can install OpenBSD without no problem at all. All you have to do just put /usr/bin/false to the /etc/shells.

# echo /usr/bin/false >> /etc/shells

And all set, now all you  need is add nu user :

# adduser

Use option “-silent” if you don’t want to see all warnings and questions.

Reading /etc/shells
Check /etc/master.passwd
Check /etc/group

Ok, let’s go.
Don’t worry about mistakes. There will be a chance later to correct any input.
Enter username []: pnyet
Enter full name []: ftp-user
Enter shell authpf csh false ksh nologin sh [ksh]: false
Uid [1002]:
Login group pnyet [pnyet]:
Login group is “pnyet”. Invite pnyet into other groups: guest no
[no]: no
Login class _mysql authpf daemon default staff [default]:
Enter password []:
Enter password again []:

Name:        pnyet
Password:    ****
Fullname:    ftp-user
Uid:         1002
Gid:         1002 (pnyet)
Groups:      pnyet
Login Class: default
HOME:        /home/pnyet
Shell:       /usr/bin/false
OK? (y/n) [y]: y
Added user “pnyet”
Copy files from /etc/skel to /home/pnyet
Add another user? (y/n) [y]: n
Goodbye!

Directory Setup

You do not need to make a /home/ftp/users or /home/ftp/bin directory. Because when you add new user you automatically make new directory.

  • /home/ftp – This is the main directory. It should be owned by root and have permissions of 555.
  • /home/ftp/etc – This is entirely optional and not recommended, as it only serves to give out information on users which exist on your box. If you want your anonymous ftp directory to appear to have real users attached to your files, you should copy /etc/pwd.db and /etc/group to this directory. This directory should be mode 511, and the two files should be mode 444. These are used to give owner names as opposed to numbers. There are no passwords stored in pwd.db, they are all in spwd.db, so don’t copy that over.
  • /home/ftp/pub – This is a standard directory to place files in which you wish to share. This directory should also be mode 555.

Start The FTP Service

All you need now is start the ftp service using the inetd or from the rc. If you want the users using their home directories you have to edit a little at the /etc/ftpchroot.

Now its ready transfer files …

Stay with your OpenBSD tho, coz its so much fun. This tutorial about working with pf and pfctl. Specially with tables, we can manipulate the table using the pfctl.

Tables can be manipulated on the fly by using pfctl(8). For instance, to add entries to the table created above:

# pfctl -t spammers -T add 218.70.0.0/16


This will also create the table if it doesn’t already exist. To list the addresses in a table:

# pfctl -t spammers -T show

The -v argument can also be used with -T show to display statistics for each table entry. To remove addresses from a table:

# pfctl -t spammers -T delete 218.70.0.0/16

For more information on manipulating tables with pfctl, please read the pfctl(8) manpage.

This howto taken from the OpenBSD PF FAQ