My new site: ardoino.com

Furious: Kernel Socks Bouncer - Man Page

Nov 19, 02:10 PM: Kernel Socks Bouncer - Man Page

NAME
ksb26 – Kernel SOCKS Bouncer [LKM – ksb26manager]

SYNOPSIS
modprobe ksb26 [nsocks=N]
ksb26manager [-h] [-d ksb26_device] [-m ksb26_lkm_name] [-n nsocks] [-t thosts_file] [-w wait_time]

DESCRIPTION
ksb26 [Kernel Socks Bouncer] redirects tcp connection (to user-defined target host) through SOCKS 4/5 chains. It uses a character device to pass SOCKS 4/5 and target hosts to the Linux Kernel. ksb26 is subdivided into a lkm [Linux Loadable Kernel Module] and a userspace manager. ksb26 lkm intercepts and redirects tcp connections. ksb26manager keeps updated SOCKS list and loads target hosts list via character device.

ksb26 lkm:
is the lkm. It intercepts and redirects tcp connections.
modprobe ksb26 [nsocks=N]
[ insmod /lib/modules/2.6.x/extra/ksb26.ko ]
This command will load ksb26 lkm.
[nsocks=N] will load ksb26 lkm setting the number of SOCKS to use in chain to N.
To detect major number read dmesg kernel logs running for example:
~# dmesg
or
~# cat /var/log/messages
Between messages of ksb26 module there’s this string:
[ksb26] Major device number = num
~# mknod /dev/ksb26 c num 0 // creates the char device

ksb26manager:
is the userspace manager for ksb26 lkm. It needs wget, egrep and sed to work.
[You don’t need ksb26manager. You can add SOCKS and target hosts manually via /dev/ksb26 character device].
ksb26manager keeps updated the SOCKS list using http://ksb26.sourceforge.net/socks/socks5.php
ksb26manager [-h] [-d ksb26_device] [-m ksb26_lkm_name] [-n nsocks] [-t thosts_file] [-w wait_time]
[-d ksb26_device]: character device used by ksb26
[-m ksb26_lkm_name]: lkm’s name to use in modprobe command
[-n nsocks]: number of SOCKS used in chains
[-t thosts_file]: file containing target hosts
[-s socks_file]: file containing default socks list
[-w wait_time]: number of seconds to wait before updating the SOCKS list
[-h]: help

/dev/ksb26 strings format:
/dev/ksb26 is the character device used by ksb26 to keep SOCKS and target hosts lists updated. Strings formats accepted:

  • ip addresses and port of SOCKS 4/5
  • ip addresses and port of target hosts [when ksb26 finds a new connection from localhost
    to that host[:port], this connection will pass through a SOCKS chain before reach the target host]
  • clear SOCKS list string [ csl ] : ksb26 clears the SOCKS list

To add a new SOCKS server to the list:

#Ssocks_ip:socks_port;socks_version|
example:

#S127.0.0.1:1080;5|

#S127.0.0.1:8080;4|
manual submission of a new SOCKS:
~# echo ”#S127.0.0.1:1080;5|” > /dev/ksb26
If you use ksb26manager you can set a default socks list in /etc/ksb26/socks that will be loaded automatically by the userspace tool .

If you don’t use ksb26manager you can create a new file as this below:

#S127.0.0.1:1080;5|

#S127.0.0.1:8080;4|
and then:
~# cat socks.txt > /dev/ksb26

To add a new target host to the list [if you use the userspace manager see /etc/ksb26/thosts]:

#Hhost_ip:host_port;|
If host_ip is *, connection directed to all IPs will be redirected.
If host_port is 0, all connection directed to that host will be redirected through a Socks chain.
example:

#H*:22;|

#H192.168.0.1:22;|

#H192.168.0.2:0;|

#H*:0;| [deprecated]
To clear SOCKS list:

#cls|

FILES
/lib/modules/2.6.x/extra/ksb26.ko

ksb26 lkm
/dev/ksb26 ksb26 character device
/usr/bin/ksb26manager ksb26manager
/etc/ksb26/thosts target hosts file
/etc/ksb26/socks default socks list file
/usr/share/man/man1/ksb26.1.gz Man page.

BUGS
Send me any bug you find. Thanks.

AUTHOR
Paolo Ardoino < paolo.ardoino@gmail.com >

SEE ALSO
Kernel Socks Bouncer

Comments made

  1. I have a debian stable 3.1 2.6 and i never patched my kernel,Yes!How do i patch into debian it has a patch command if i’m not wrong and i wonder if thereis a correct way for ksb2.6


    Apr 14, 11:32 PM
  2. Why not just a normal iptables target module..

    /usr/sbin/iptables -t nat -A PREROUTING -p tcp -s 84.22.98.0/23—dport 6667 -j SOCKS4—proxy=tor.cb3rob.net:9050

    something along those lines would be nice..
    so you can intercept specific ports over whole netranges on a core router and socksify them completely transparant to the users, applications and computer system involved.


    May 15, 12:30 AM
  3. Same suggestion as Sven Kamphuis… via IP-Tables would be verry nice!!!


    Jan 10, 06:20 PM
  4. Good morning. Hollywood is a place where they place you under contract instead of under observation. Help me! I find sites on the topic: Payday loan. I found only this – web credit card processing. But the question arises in the mind of many people that whether they can get their free credit report without a credit card. This credit score comes in very handy to the lenders when you are applying for a car loan or a home loan, for a credit card, or any other type of loans. Waiting for a reply :mad:, Candie from Niger.


    Jul 6, 01:09 PM
  5. Hi guys. How we remember, what we remember and why we remember form the most personal map of our individuality.
    I am from Uzbekistan and now teach English, please tell me right I wrote the following sentence: “Comforter sets comforter sets comforter.”

    With best wishes :p, Ciceron.


    Jul 17, 06:17 AM
  6. Excuse me. A man is too apt to forget that in this world he cannot have everything. A choice is all that is left him. Help me! It has to find sites on the: Signature payday loan. I found only this – Payday loan consolidation. Payday loan companies face legislation caps business. Alternative sources of credit other than payday loans by drew millerpayday loans are the most expensive short term secured or unsecured cash advance loans available to people with regular paycheck. Thanks for the help :-(, Abigail from Palau.


    Jul 20, 07:39 PM
  7. How are you! I was wondering if anyone could help me by giving me some arabic preyers so I can copy them out as I am making a torah for school! Please email me or reply on this Guestbook! Thank you! I love the website by the way!.
    I am from Cape and also now teach English, give please true I wrote the following sentence: ” Disks storage server 2003 nas target can be synchronous, which enables that they are without any earnings, costs or applications, and are formatted enough.”

    THX :), Open iscsi howto.


    Oct 18, 10:26 AM

Add comment

name
email
http://
Message
  Textile Help

Kernel Socks Bouncer Phpspellbook - Documentation

 
Warwide