Install Dante socks proxy

Monday, May 24th, 2010

Dante socks install :

Download Dante from : ftp://ftp.inet.no/pub/socks/dante-1.2.0.tar.gz

tar zxvf dante-1.2.0.tar.gz
cd dante-1.2.0
yum install gcc make
./configure
make -j4
make install

ifconfig -a |  grep inet | awk ‘{print $2}’ | awk -F ‘:’ ‘{print $2}’ | grep -v 127.0.0.1 >  /root/ips

for i in `cat ips` ;do echo “internal: $i port = 6060″ >> /root/sockd.conf ;done

Example of sockd.conf :

logoutput: stderr
method: username none
external: externalIPtouse
client pass {
from: 0.0.0.0/0 port 1-65535 to: 0.0.0.0/0
}
pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
method: username
protocol: tcp udp
}

Launch using :

sockd -f /root/sockd.conf -d

RPM relocatable packages

Thursday, June 18th, 2009

RPM has an option (–prefix) that allows users to install rpms in other directories than the default ones.
Packages that allow to be installed in other directories are called : relocatable

[root@localhost gcc]# rpm -qpi libxslt-1.1.24-4.fc11.i586.rpm | grep Relocations
Name : libxslt Relocations: /usr
[root@localhost gcc]# rpm -qi libxslt | grep Relo
Name : libxslt Relocations: /usr

So basically you can install this package in other directory.

[root@localhost gcc]# rpm -ihv libxslt-1.1.24-4.fc11.i586.rpm –prefix $PWD –force
Preparing… ########################################### [100%]
1:libxslt ########################################### [100%]
[root@localhost gcc]# ls
bin lib libxslt-1.1.24-4.fc11.i586.rpm share

For example gcc is not relocatable and installing it in an different directory is not allowd:

[root@localhost gcc]# rpm -qi gcc | grep Relo
Name : gcc Relocations: (not relocatable)
[root@localhost gcc]# rpm -Uhv gcc-4.1.2-33.i386.rpm –prefix=$PWD
error: package gcc is not relocatable

Multiple gcc versions

Thursday, June 18th, 2009

Lets say you have this package from FC11:

[root@localhost ~]# rpm -q gcc
gcc-4.4.0-4.i586

But you have an source code that needs gcc-4.3 to compile or something lower.

So download lets say this: gcc-4.3.2-7.i386.rpm then:

mkdir newgcc && cd newgcc
download http://pathtogcc/gcc-4.3.2-7.i386.rpm
rpm2cpio gcc-4.3.2-7.i386.rpm | cpio -idv

Now you should have in newgcc/usr/bin/gcc.

Or download the gcc package you need from ftp://ftp.gnu.org and compile it with –prefix=$HOME/newgcc