OpenBSD's doas (dedicated openbsd application subexecutioner) is a neat tool don't get me wrong and the config syntax is simple. But sometimes... you just miss sudo. 😢
Then you started googling and someone came up with a better name for doas... *bites lower lip while typing this* LMAO
Wednesday, January 24, 2018
Tuesday, January 9, 2018
Building Flashrom for Buspirate
Tested on ubuntu mate
Pull flashrom's SVN:
svn co https://code.coreboot.org/svn/flashrom/trunk
Install dependencies:
sudo apt-get install libpci-dev libpci3 libusb-dev
Build Flashrom:
make
make install
flashrom
Pull flashrom's SVN:
svn co https://code.coreboot.org/svn/flashrom/trunk
Install dependencies:
sudo apt-get install libpci-dev libpci3 libusb-dev
Build Flashrom:
make
make install
flashrom
Friday, November 24, 2017
Nuking OSX's Logical Volume Group (LVG)
Nuking OSX's Logical Volume Group (LVG). Just because, i don't like your stinking control software.
Command+R
Open Terminal
(make sure you are root #)
#diskutil cs list
#diskutil cs delete
UUID of Logical Volume Group
Monday, November 6, 2017
I'm lazy but i want a new version of nmap running on OpenBSD 5.9. But sadly lazy build (./configure && gmake && gmake install) just won't cut it. I'm not lazy to figure out why it doesn't. so finally got it working
# uname -psvr
OpenBSD 5.9 GENERIC#1761 amd64
# pwd
/root/nmap-7.60
# ./configure --without-zenmap --with-libpcap=included
# gmake && gmake install
# nmap -V
Nmap version 7.60 ( https://nmap.org )
Platform: x86_64-unknown-openbsd5.9
Compiled with: nmap-liblua-5.3.3 openssl-2.3.2 nmap-libssh2-1.8.0 libz-1.2.8 nmap-libpcre-7.6 nmap-libpcap-1.7.3 nmap-libdnet-1.12 ipv6
Compiled without:
Available nsock engines: kqueue poll select
OK back to being lazy again :)
Thursday, August 17, 2017
OpenBSD and Tor
Building tor from source tree.
export PKG_PATH="ftp://ftp.hostserver.de/pub/OpenBSD/5.9/packages/amd64/"
pkg_add -iv libevent
wget https://www.torproject.org/dist/tor-0.3.0.10.tar.gz
tar zxvf tor-0.3.0.10.tar.gz
cd tor-0.3.0.10
./configure --prefix=/usr/local
gmake
gmake install
I'll post how i configure shit when, I have time.
export PKG_PATH="ftp://ftp.hostserver.de/pub/OpenBSD/5.9/packages/amd64/"
pkg_add -iv libevent
wget https://www.torproject.org/dist/tor-0.3.0.10.tar.gz
tar zxvf tor-0.3.0.10.tar.gz
cd tor-0.3.0.10
./configure --prefix=/usr/local
gmake
gmake install
I'll post how i configure shit when, I have time.
Wednesday, February 8, 2017
Override OpenJDK with Oracle's JDK8
I'm so lazy so here it is plain and simple. works on Ubuntu'ish Linux
cat > /etc/apt/sources.list.d/webupd8team-java.list<< EOF
deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
EOF
Added keys to the repo
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
Update Packages
apt-get update
apt-get install oracle-java8-installer
Done!
Thursday, December 22, 2016
Nethunter Update/Upgrade Shenanigans
Scouring for answers on the forums takes a while to get the real answer. My intention is to put the basics here of how I fixed it.
Issue #1 - Nethunter failed Repo:
Solution: Add Kali-Rolling's Repo on /etc/apt/sources.list
Issue #2 Upgrading Nethunter
Solution: Uninstall Nethunter App (like you do with regular Android Apps) and Install lastest.apk
Friday, January 16, 2015
Building ruby-oci8 using Oracle 12.1.0.2.0 instaclient
from Kali a quick and dirty build for ruby-oci8 for Oracle testing. this is using the latest instaclient .zips from Oracle.
Step 1: Download Oracle
http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html
Step 2:
mkdir /opt/oracle
cd /opt/oracle
git clone https://github.com/kubo/ruby-oci8 ruby-oci8
unzip instantclient-basic-linux.x64-12.1.0.2.0.zip
unzip instantclient-sdk-linux.x64-12.1.0.2.0.zip
unzip instantclient-sqlplus-linux.x64-12.1.0.2.0.zip
ln -s libclntsh.so.12.1 libclntsh.so
#!/bin/bash
echo "export PATH=$PATH:/opt/oracle/instantclient_12_1" >> /root/.bashrc
echo "export SQLPATH=/opt/oracle/instantclient_12_1" >> /root/.bashrc
echo "export TNS_ADMIN=/opt/oracle/instantclient_12_1" >> /root/.bashrc
echo "export LD_LIBRARY_PATH=/opt/oracle/instantclient_12_1" >> /root/.bashrc
echo "export ORACLE_HOME=/opt/oracle/instantclient_12_1" >> /root/.bashrc
export LD_LIBRARY_PATH=/opt/oracle/instantclient_12_1
cd ruby-oci8
ruby setup.rb config
ruby setup.rb setup
ruby setup.rb install
Tuesday, March 20, 2012
Riorey
I've used them for a couple of years cool hardware they got performance wise it really does what it's supposed to do. I recommend it for people that wanted a more automated approach to DDoS Mitigation.
http://www.riorey.com/company-difference.html
It's quite kind for riorey to publish their Taxonomy of DDoS Attacks. pretty nice read.
http://www.riorey.com/x-resources/2011/RioRey_Taxonomy_DDoS_Attacks_2.2_2011.pdf
Monday, March 19, 2012
VirtualBox 4.1.10 on Solaris 10 Update 10
I've been building a cool lab using Virtualbox 4.1.10 and run it under a headless setup on Solaris 10 Update 10. I've been hitting a wall with a silly error
Installing Python bindings...
Traceback (most recent call last):
File "./vboxapisetup.py", line 14, in ?
from distutils.core import setup
ImportError: No module named distutils.core
- Installed: Bindings for Python 2.6
Updating the boot archive...
Installation of was successful.
VirtualBox installs fine but I want to find out why is that error creeping out whereas it should be just a smooth install. I hopped into the forums and found that it's an old error and was fixed by installing SUNWPython-devel.. but no dice I have the file installed but my issue still continues..
$ pkginfo | grep Python
GNOME2 SUNWPython The Python interpreter, libraries and utilities
GNOME2 SUNWPython-devel The Python interpreter, libraries and utilities - development files
GNOME2 SUNWPython-share The Python interperer, libraries and utilities - platform independent files, /usr/sfw/share
system SUNWlxml-python The XML library - Python bindings
system SUNWlxsl-python The XSLT library - Python bindings
I found the file that is breaking it's python hopping which is the reason why it breaks.
# ./pkginstall.sh
Checking for older & partially installed bits...
- Unloaded: Web service
- Unloaded: Balloon control service
- Unloaded: Zone access service
- Unloaded: NetFilter (STREAMS) module
- Removed: NetFilter (STREAMS) module
- Unloaded: NetAdapter module
- Removed: NetAdapter module
- Unloaded: Host module
- Removed: Host module
Updating the boot archive...
Installing new ones...
Detected Solaris 5.10 Version Generic_147441-01
Loading VirtualBox kernel modules...
- Loaded: Host module
- Loaded: NetAdapter module
- Loaded: NetFilter (STREAMS) module
Configuring services...
- Loaded: Zone access service
Installing MIME types and icons...
Installing Python bindings...
/usr/bin/python2.4 <-- here's where the python hopping begins.
Traceback (most recent call last):
File "vboxapisetup.py", line 14, in ?
from distutils.core import setup
ImportError: No module named distutils.core
/usr/bin/python2.6 <-- this is the python version i want
- Installed: Bindings for Python 2.6
Updating the boot archive...
Post installation completed successfully!
Installing Python bindings...
Traceback (most recent call last):
File "./vboxapisetup.py", line 14, in ?
from distutils.core import setup
ImportError: No module named distutils.core
- Installed: Bindings for Python 2.6
Updating the boot archive...
Installation of
VirtualBox installs fine but I want to find out why is that error creeping out whereas it should be just a smooth install. I hopped into the forums and found that it's an old error and was fixed by installing SUNWPython-devel.. but no dice I have the file installed but my issue still continues..
$ pkginfo | grep Python
GNOME2 SUNWPython The Python interpreter, libraries and utilities
GNOME2 SUNWPython-devel The Python interpreter, libraries and utilities - development files
GNOME2 SUNWPython-share The Python interperer, libraries and utilities - platform independent files, /usr/sfw/share
system SUNWlxml-python The XML library - Python bindings
system SUNWlxsl-python The XSLT library - Python bindings
I found the file that is breaking it's python hopping which is the reason why it breaks.
# ./pkginstall.sh
Checking for older & partially installed bits...
- Unloaded: Web service
- Unloaded: Balloon control service
- Unloaded: Zone access service
- Unloaded: NetFilter (STREAMS) module
- Removed: NetFilter (STREAMS) module
- Unloaded: NetAdapter module
- Removed: NetAdapter module
- Unloaded: Host module
- Removed: Host module
Updating the boot archive...
Installing new ones...
Detected Solaris 5.10 Version Generic_147441-01
Loading VirtualBox kernel modules...
- Loaded: Host module
- Loaded: NetAdapter module
- Loaded: NetFilter (STREAMS) module
Configuring services...
- Loaded: Zone access service
Installing MIME types and icons...
Installing Python bindings...
/usr/bin/python2.4 <-- here's where the python hopping begins.
Traceback (most recent call last):
File "vboxapisetup.py", line 14, in ?
from distutils.core import setup
ImportError: No module named distutils.core
/usr/bin/python2.6 <-- this is the python version i want
- Installed: Bindings for Python 2.6
Updating the boot archive...
Post installation completed successfully!
I checked the script and it's pointing to another script named vboxconfig.sh, Since it shows that it won't stay put on just one version of python I decided to just cut the code where it does auto-detection (more like auto-defect than detect here)
PYTHONBIN=`which python 2> /dev/null`
if test -f "$PYTHONBIN" || test -h "$PYTHONBIN"; then
infoprint "Installing Python bindings..."
INSTALLEDIT=1
# PYTHONBIN=`which python2.4 2>/dev/null`
# install_python_bindings "$PYTHONBIN" "Python 2.4"
# if test "$?" -eq 0; then
# INSTALLEDIT=0
# fi
# PYTHONBIN=`which python2.5 2>/dev/null`
# install_python_bindings "$PYTHONBIN" "Python 2.5"
# if test "$?" -eq 0; then
# INSTALLEDIT=0
# fi
PYTHONBIN=`which python2.6 2>/dev/null`
install_python_bindings "$PYTHONBIN" "Python 2.6"
if test "$?" -eq 0; then
INSTALLEDIT=0
fi
Final test and...
# ./pkginstall.sh
Checking for older & partially installed bits...
- Unloaded: Web service
- Unloaded: Balloon control service
- Unloaded: Zone access service
- Unloaded: NetFilter (STREAMS) module
- Removed: NetFilter (STREAMS) module
- Unloaded: NetAdapter module
- Removed: NetAdapter module
- Unloaded: Host module
- Removed: Host module
Updating the boot archive...
Installing new ones...
Detected Solaris 5.10 Version Generic_147441-01
Loading VirtualBox kernel modules...
- Loaded: Host module
- Loaded: NetAdapter module
- Loaded: NetFilter (STREAMS) module
Configuring services...
- Loaded: Zone access service
Installing MIME types and icons...
Installing Python bindings...
- Installed: Bindings for Python 2.6
Updating the boot archive...
Post installation completed successfully!
it worked! good times. I'm running the following version just so people can see.
Solaris 10 Update 10
VirtualBox 4.1.10 (VirtualBox-4.1.10-SunOS-r76795.pkg)
Python2.6.4
Saturday, February 5, 2011
GPG for your Mac
Talking to peers over email is a unsecure (for the paranoid in me). It's nice to try something that can make the badguys work a bit harder. Enter... GPG!
GPG (Gnu PGP) is a good way of encrypting and verifying that the data really belongs to the said person, and here's how i did it on my mac.
Install GPG
http://www.gpgtools.org/installer.html
From the shell[Terminal]. ($)
Tip 1.) To Generate your own GPG Key (Follow the instructions after running the command below. Keep the Default DSA Elgamal Encryption) and viola! you have your own gpg key.
$gpg --gen-key
Tip 2.) To Verify your key
$gpg --list-secret-keys
Tip 3.) Exporting your GPG Key (good for Emails)
$gpg --output MyGPGKey.pgp --export john@doe.email
Tip 4.) Exporting your GPG Key (for Public Display website, etc.)
$gpg --output MyGPGKey.pgp --export john@doe.email --armor
Tip 5.) Importing someone else's GPG Key (Extensions sometimes come as .asc or .gpg)
$gpg --import foobar.asc
GPG (Gnu PGP) is a good way of encrypting and verifying that the data really belongs to the said person, and here's how i did it on my mac.
Install GPG
http://www.gpgtools.org/installer.html
From the shell[Terminal]. ($)
Tip 1.) To Generate your own GPG Key (Follow the instructions after running the command below. Keep the Default DSA Elgamal Encryption) and viola! you have your own gpg key.
$gpg --gen-key
Tip 2.) To Verify your key
$gpg --list-secret-keys
Tip 3.) Exporting your GPG Key (good for Emails)
$gpg --output MyGPGKey.pgp --export john@doe.email
Tip 4.) Exporting your GPG Key (for Public Display website, etc.)
$gpg --output MyGPGKey.pgp --export john@doe.email --armor
Tip 5.) Importing someone else's GPG Key (Extensions sometimes come as .asc or .gpg)
$gpg --import foobar.asc
Tip 6.) To Validate GPG Keys from others
$gpg --edit-key john@doe.email
Tip 7.) To send your key to a public GPG Server (GPG ID is found on the sec portion of the output for Tip #2)
$gpg --send-keys GPG ID
Keep safe on the Internet
Tuesday, January 25, 2011
In-line Image Go Away.
I really hate the way mac os x mail does inline attachments.
Why can they just leave the attachments alone....
after googling i found a way to make this go away and behave like any good old attachment.
To Disable In-line attachments on Mail.app [AppleKey + Shift + U --> select Terminal.app] with this command:
defaults write com.apple.mail DisableInlineAttachmentViewing -bool yes
If you want to make your email look default butt ugly you can restore it on Mail.app [AppleKey + Shift + U --> select Terminal.app] with this command:
defaults write com.apple.mail DisableInlineAttachmentViewing -bool false
whew! :) Better!
Why can they just leave the attachments alone....
after googling i found a way to make this go away and behave like any good old attachment.
To Disable In-line attachments on Mail.app [AppleKey + Shift + U --> select Terminal.app] with this command:
defaults write com.apple.mail DisableInlineAttachmentViewing -bool yes
If you want to make your email look default butt ugly you can restore it on Mail.app [AppleKey + Shift + U --> select Terminal.app] with this command:
defaults write com.apple.mail DisableInlineAttachmentViewing -bool false
whew! :) Better!
Saturday, September 18, 2010
Hitchhiker's Guide to Hiding on the Internet for MacFolks
Recently updated my Vidalia App and I got in to some issues with polipo. I redo the entire installation and proceed as follows:
Vidalia 0.2.10
Tor 0.2.1.25
Download Vidalia directly from the website: http://www.torproject.org/vidalia/
Install MacPorts
sudo port install tor
sudo port install polipo
sudo port load polipo
Polipo Configuration Guide:
polipo does not come with a working config you have to make your own or just copy and customize the sample configs found on /opt/local/etc/polipo/ here's how i did mine.
sudo touch /opt/local/etc/polipo/config
Open an editor program (vi/etc) and put the following config
socksParentProxy = "localhost:9050"
socksProxyType = socks5
Port 9050 is the tor deamon.
to verify your polipo config
http://localhost:8123
Vidalia Settings
Stop Start the Vidalia Daemon (Gui)
and point your proxy to
IP: localhost
Port: 8123
enjoy secure surfing via tor.
to check your tor presence go to the following link.
https://check.torproject.org
Vidalia 0.2.10
Tor 0.2.1.25
Download Vidalia directly from the website: http://www.torproject.org/vidalia/
Install MacPorts
sudo port install tor
sudo port install polipo
sudo port load polipo
Polipo Configuration Guide:
polipo does not come with a working config you have to make your own or just copy and customize the sample configs found on /opt/local/etc/polipo/ here's how i did mine.
sudo touch /opt/local/etc/polipo/config
Open an editor program (vi/etc) and put the following config
socksParentProxy = "localhost:9050"
socksProxyType = socks5
Port 9050 is the tor deamon.
to verify your polipo config
http://localhost:8123
Vidalia Settings
Stop Start the Vidalia Daemon (Gui)
and point your proxy to
IP: localhost
Port: 8123
enjoy secure surfing via tor.
to check your tor presence go to the following link.
https://check.torproject.org
Wednesday, July 21, 2010
DVD on Mac OS X stopped working
Mac OS X weird Logs:
7/21/10 8:27:37 PM kernel SCSITaskUserClient - Invalid arguments: scatterGatherEntries = 1, requestedTransferCount = 0, transfer direction is 0
7/21/10 8:27:38 PM kernel SCSITaskUserClient - Invalid arguments: scatterGatherEntries = 1, requestedTransferCount = 0, transfer direction is 0
7/21/10 8:27:39 PM kernel SCSITaskUserClient - Invalid arguments: scatterGatherEntries = 1, requestedTransferCount = 0, transfer direction is 0
7/21/10 8:27:40 PM kernel SCSITaskUserClient - Invalid arguments: scatterGatherEntries = 1, requestedTransferCount = 0, transfer direction is 0
7/21/10 8:27:41 PM kernel SCSITaskUserClient - Invalid arguments: scatterGatherEntries = 1, requestedTransferCount = 0, transfer direction is 0
I tried to burn with toaster but no dice. I'm uninstalling the toaster and re-trying it.
**UPDATE**
After uninstalling Toaster 10 on my Mac. My CDROM work flawlessly. it seems that this issue started after I applied a patch on my Mac. considering the weight of burning using toaster and having bugs fixed on Mac OS X, I would choose an OS patch than a 3rd party burner. I can always burn through (AppleKey + Shift + U) Disk Utilities.
7/21/10 8:27:37 PM kernel SCSITaskUserClient - Invalid arguments: scatterGatherEntries = 1, requestedTransferCount = 0, transfer direction is 0
7/21/10 8:27:38 PM kernel SCSITaskUserClient - Invalid arguments: scatterGatherEntries = 1, requestedTransferCount = 0, transfer direction is 0
7/21/10 8:27:39 PM kernel SCSITaskUserClient - Invalid arguments: scatterGatherEntries = 1, requestedTransferCount = 0, transfer direction is 0
7/21/10 8:27:40 PM kernel SCSITaskUserClient - Invalid arguments: scatterGatherEntries = 1, requestedTransferCount = 0, transfer direction is 0
7/21/10 8:27:41 PM kernel SCSITaskUserClient - Invalid arguments: scatterGatherEntries = 1, requestedTransferCount = 0, transfer direction is 0
I tried to burn with toaster but no dice. I'm uninstalling the toaster and re-trying it.
**UPDATE**
After uninstalling Toaster 10 on my Mac. My CDROM work flawlessly. it seems that this issue started after I applied a patch on my Mac. considering the weight of burning using toaster and having bugs fixed on Mac OS X, I would choose an OS patch than a 3rd party burner. I can always burn through (AppleKey + Shift + U) Disk Utilities.
Wednesday, March 17, 2010
Finding out information on a ton of IP's
I made the following script to make life simple.. (atleast for me)
#!/usr/bin/perl
open (ipfile, 'ip.csv');
while () {
chomp;
$nrange = '| /usr/bin/egrep -i "NetRange|Country|OrgName|NET"';
print "$_\n";
my $ips = "$_";
my $output = qx/whois $ips $nrange/;
print $output;
sample: ip.csv
192.168.1.0
:) yey no more manual whois crap.
I made the following script to make life simple.. (atleast for me)
#!/usr/bin/perl
open (ipfile, 'ip.csv');
while (
chomp;
$nrange = '| /usr/bin/egrep -i "NetRange|Country|OrgName|NET"';
print "$_\n";
my $ips = "$_";
my $output = qx/whois $ips $nrange/;
print $output;
sample: ip.csv
192.168.1.0
:) yey no more manual whois crap.
Saturday, February 27, 2010
Attack_Simulation_and_Threat_Modeling
Attack Simulation and Threat Modeling.
I got this off google's html cache. since the main site is bogged down.(too many users downloading this doc) It's a pretty good read.
enjoy.
RapidShare Link:
http://rapidshare.com/files/370085717/Attack_Simulation_and_Threat_Modeling.zip.html
MD5: C1A1E731E1FBF67516D20242355D0218
I got this off google's html cache. since the main site is bogged down.(too many users downloading this doc) It's a pretty good read.
enjoy.
RapidShare Link:
http://rapidshare.com/files/370085717/Attack_Simulation_and_Threat_Modeling.zip.html
MD5: C1A1E731E1FBF67516D20242355D0218
Friday, February 26, 2010
Proxychains 3.1 on OpenBSD 4.6
Proxychains - Great tool for tor'ing.
Patch introduced on the misc-openbsd instructed me on getting the freebsd version of the patch.
FreeBSD patch Link:
http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/ports/net/proxychains/files/patch-proxychains-libproxychains.c?rev=1.1;content-type=text%2Fplain
I tried to build it but no dice. After messing around with it. I got a working patch: please see below.
--- proxychains/libproxychains.c.orig Wed Mar 15 18:16:59 2006
+++ proxychains/libproxychains.c Sun Dec 10 01:16:37 2006
@@ -160,7 +160,7 @@
if(!(file=fopen("./proxychains.conf","r")))
if(!(file=fopen(buff,"r")))
- if(!(file=fopen("/etc/proxychains.conf","r")))
+ if(!(file=fopen("/etc/proxychains.conf","r")))
{
perror("Can't locate proxychains.conf");
exit(1);
@@ -290,8 +290,8 @@
int getnameinfo (const struct sockaddr * sa,
socklen_t salen, char * host,
- socklen_t hostlen, char * serv,
- socklen_t servlen, unsigned int flags)
+ size_t hostlen, char * serv,
+ size_t servlen, int flags)
{
int ret = 0;
if(!init_l)
Apply patch and build it.
./configure --prefix=/usr/local <-- prefix location needs to be specified.
gmake
sudo gmake install
patch is tested on openbsd 4.6(stable) and proxychains 3.1
Patch introduced on the misc-openbsd instructed me on getting the freebsd version of the patch.
FreeBSD patch Link:
http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/ports/net/proxychains/files/patch-proxychains-libproxychains.c?rev=1.1;content-type=text%2Fplain
I tried to build it but no dice. After messing around with it. I got a working patch: please see below.
--- proxychains/libproxychains.c.orig Wed Mar 15 18:16:59 2006
+++ proxychains/libproxychains.c Sun Dec 10 01:16:37 2006
@@ -160,7 +160,7 @@
if(!(file=fopen("./proxychains.conf","r")))
if(!(file=fopen(buff,"r")))
- if(!(file=fopen("/etc/proxychains.conf","r")))
+ if(!(file=fopen("/etc/proxychains.conf","r")))
{
perror("Can't locate proxychains.conf");
exit(1);
@@ -290,8 +290,8 @@
int getnameinfo (const struct sockaddr * sa,
socklen_t salen, char * host,
- socklen_t hostlen, char * serv,
- socklen_t servlen, unsigned int flags)
+ size_t hostlen, char * serv,
+ size_t servlen, int flags)
{
int ret = 0;
if(!init_l)
Apply patch and build it.
./configure --prefix=/usr/local <-- prefix location needs to be specified.
gmake
sudo gmake install
patch is tested on openbsd 4.6(stable) and proxychains 3.1
Saturday, December 12, 2009
ZABBIX_1.8 TWEAKS
Playing with Sharememory (OpenBSD) Style
kern.shminfo.shmmax=204800000
kern.shminfo.shmall=40960000
FreeBSD Tweak for ZABBIX-1.8
kern.ipc.shmall=40960000
kern.ipc.shmmax=204800000
took me a while to see zabbix running =)
kern.shminfo.shmmax=204800000
kern.shminfo.shmall=40960000
FreeBSD Tweak for ZABBIX-1.8
kern.ipc.shmall=40960000
kern.ipc.shmmax=204800000
took me a while to see zabbix running =)
Monday, October 19, 2009
Ruby 1.8.7 iconv issue
successfully build ruby 1.8.7 on OpenBSD 4.5
./configure && make && make test && sudo make install
Installed RubyGems -
running ruby I got the following error:
WARNING: No database support: LoadError no such file to load -- iconv
After doing some googling i found the following fix:
$ cd ruby-1.8.7-p174/ext/iconv/
$ ruby extconf.rb --prefix=/usr/local --with-iconv-dir=/usr/local
checking for iconv() in iconv.h... no
checking for iconv() in -liconv... yes
checking for const of iconv() 2nd argument... no
creating Makefile
$ make
gcc -I. -I. -I/usr/local/lib/ruby/1.8/i386-openbsd4.5 -I. -I/usr/local/include -fPIC -g -O2 -c iconv.c
gcc -shared -fPIC -o iconv.so iconv.o -L. -L/usr/local/lib -Wl,-R/usr/local/lib -L/usr/local/lib -Wl,-R/usr/local/lib -L. -Wl,-E -liconv -lm -lc
$ sudo make install
/usr/bin/install -c -m 0755 iconv.so /usr/local/lib/ruby/site_ruby/1.8/i386-openbsd4.5
I'm using ruby for metasploit so having the following fix really save me a lot of trouble.
./configure && make && make test && sudo make install
Installed RubyGems -
running ruby I got the following error:
WARNING: No database support: LoadError no such file to load -- iconv
After doing some googling i found the following fix:
$ cd ruby-1.8.7-p174/ext/iconv/
$ ruby extconf.rb --prefix=/usr/local --with-iconv-dir=/usr/local
checking for iconv() in iconv.h... no
checking for iconv() in -liconv... yes
checking for const of iconv() 2nd argument... no
creating Makefile
$ make
gcc -I. -I. -I/usr/local/lib/ruby/1.8/i386-openbsd4.5 -I. -I/usr/local/include -fPIC -g -O2 -c iconv.c
gcc -shared -fPIC -o iconv.so iconv.o -L. -L/usr/local/lib -Wl,-R/usr/local/lib -L/usr/local/lib -Wl,-R/usr/local/lib -L. -Wl,-E -liconv -lm -lc
$ sudo make install
/usr/bin/install -c -m 0755 iconv.so /usr/local/lib/ruby/site_ruby/1.8/i386-openbsd4.5
I'm using ruby for metasploit so having the following fix really save me a lot of trouble.
Saturday, October 10, 2009
OpenVPN on OpenBSD
I'm running OpenBSD 4.5 (Stable) on this setup
1.) download openvpn package through ports-tree or PKG_PATH
2.) cp -R /usr/local/share/example/openvpn/easy-rsa /etc/openvpn
3.) cd /etc/openvpn/easy-rsa/1.0 (freaking 2.0 is broken ./vars goes bonkers)
4.) . ./vars
5.) ./clean-all
6.) ./build-ca <-- this will build ca.crt
7.) ./build-key-server your-server-name <-- this will build server.crt/server.key
8.) ./build-dh
Adding Certificates:
1.) /etc/openvpn/easy-rsa/1.0
2.) . ./vars
3.) build-key your-client-name
Revoking Certificates:
1.) /etc/openvpn/easy-rsa/1.0
2.) . ./vars
3.) ./revoke-full your-client-name
== server ==
server.conf
local IP-TO-LISTEN
port 1194
proto udp
dev tun0
ca ca.crt
cert server-name.crt
key server-name.key
dh dh1024.pem
server 10.8.0.0 255.255.255.0 <-- this is default you can change it
ifconfig-pool-persist ipp.txt
keepalive 10 120
comp-lzo
max-clients 50
user _openvpn
group _openvpn
persist-key
persist-tun
status /var/log/openvpn-status.log
log /var/log/openvpn.log
log-append /var/log/openvpn.log
verb 9
mute 10
== client ==
follow the intstructions on
http://www.openvpn.net/index.php/open-source/downloads.html
Mac Users Like me: use "viscosity"
And your done!
NOTE vpn-keys are without a passphrase, you can change them at any time with the openvpn gui (change password)
enjoy... it was a smooth setup just don't get excited with the options.. the lesser the options the better chances of deploying it quickly .. once you have a working vpn server .. then you can play Little Einstein. =)
1.) download openvpn package through ports-tree or PKG_PATH
2.) cp -R /usr/local/share/example/openvpn/easy-rsa /etc/openvpn
3.) cd /etc/openvpn/easy-rsa/1.0 (freaking 2.0 is broken ./vars goes bonkers)
4.) . ./vars
5.) ./clean-all
6.) ./build-ca <-- this will build ca.crt
7.) ./build-key-server your-server-name <-- this will build server.crt/server.key
8.) ./build-dh
Adding Certificates:
1.) /etc/openvpn/easy-rsa/1.0
2.) . ./vars
3.) build-key your-client-name
Revoking Certificates:
1.) /etc/openvpn/easy-rsa/1.0
2.) . ./vars
3.) ./revoke-full your-client-name
== server ==
server.conf
local IP-TO-LISTEN
port 1194
proto udp
dev tun0
ca ca.crt
cert server-name.crt
key server-name.key
dh dh1024.pem
server 10.8.0.0 255.255.255.0 <-- this is default you can change it
ifconfig-pool-persist ipp.txt
keepalive 10 120
comp-lzo
max-clients 50
user _openvpn
group _openvpn
persist-key
persist-tun
status /var/log/openvpn-status.log
log /var/log/openvpn.log
log-append /var/log/openvpn.log
verb 9
mute 10
== client ==
follow the intstructions on
http://www.openvpn.net/index.php/open-source/downloads.html
Mac Users Like me: use "viscosity"
And your done!
NOTE vpn-keys are without a passphrase, you can change them at any time with the openvpn gui (change password)
enjoy... it was a smooth setup just don't get excited with the options.. the lesser the options the better chances of deploying it quickly .. once you have a working vpn server .. then you can play Little Einstein. =)
Subscribe to:
Posts (Atom)


