Tuesday, November 27, 2012

ifconfig alias


# cat /etc/hostname.dc0
inet 192.168.0.2 255.255.255.0 NONE media 100baseTX
inet alias 192.168.0.3 255.255.255.255
inet alias 192.168.0.4 255.255.255.255
Once you've made this file, it just takes a reboot for it to take effect. You can, however, bring up the aliases by hand using the ifconfig(8) utility. To bring up the first alias you would use the command:

# ifconfig dc0 inet alias 192.168.0.3 netmask 255.255.255.255

REFERENCE:
http://www.openbsd.org/faq/faq6.html#Setup.aliases

pftop filter specific pattern

-f filter. for example:

pftop -f 'src host 172.30.26.34'

Thursday, November 15, 2012

snmpd setup

It's pretty easy to enable snmpd on OpenBSD. Simply edit /etc/snmpd.conf to configure the interface which snmpd should listen on, and left other settings by default. Fireup snmpd and it will listen on udp port 161.

Then you can use snmp tools such as MRTG or Cacti to retrieve info via SNMP version 2.

Tuesday, November 6, 2012

get packages for current & previous version of OpenBSD

http://ftp.openbsd.org/pub/OpenBSD/ftplist

Only packages of current three versions available on the official FTP. Some of other mirror FTPs also have packages of very early versions.

 

Tuesday, October 30, 2012

SSH: Agent Admitted Failure To Sign...

When you encounter error message of "SSH: Agent Admitted Failure To Sign..." with your new ssh key, just simply log off current session and re-login again.

Another way to fix this issue within the current session is to type # ssh-add, then the new key will be added to ssh-agent.

REFERENCE:
http://www.cyberciti.biz/faq/unix-appleosx-linux-bsd-agent-admitted-failuretosignusingkey/

ssh port-forwarding in the background

$ ssh -fNL 2222:localhost:2222 pride

REFERENCE :
Lucas, M. W. SSH Mastery: OpenSSH, Tunnels and Keys

Monday, October 29, 2012

chmod -R 700 ~/.ssh for authorized_keys

permission of 700 may be required for correct setup of ssh key authorization!