RSS feed
<< 2월 2008 | Home | 4월 2008 >>

OpenBSD GNU HttpTunnel 설치하기

OpenBSD에 간단히 GNU HttpTunnel 설치하기

openbsd (i386 4.1기준) 으로 기본적으로 포함된 GNU HttpTunnel 을 설치사용하는 순서.


i386 기준으로
======================== ssh 접속후 =============================
# export PKG_PATH=ftp://ftp.kaist.ac.kr/pub/OpenBSD/4.1/packages/`machine -a`/
# sudo pkg_add -v httptunnel-3.3
parsing httptunnel-3.3
httptunnel-3.3: complete

#hts -help
Usage: hts [OPTION]... [PORT]
Listen for incoming httptunnel connections at PORT (default port is 8888).
When a connection is made, I/O is redirected to the destination specified
by the --device, --forward-port or --stdin-stdout switch.

-c, --content-length BYTES use HTTP PUT requests of BYTES size
(k, M, and G postfixes recognized)
-d, --device DEVICE use DEVICE for input and output
-F, --forward-port HOST:PORT connect to PORT at HOST and use it for
input and output
-h, --help display this help and exit
-k, --keep-alive SECONDS send keepalive bytes every SECONDS seconds
(default is 5)
-M, --max-connection-age SEC maximum time a connection will stay
open is SEC seconds (default is 300)
-s, --stdin-stdout use stdin/stdout for communication
(implies --no-daemon)
-S, --strict-content-length always write Content-Length bytes in requests
-V, --version output version information and exit
-w, --no-daemon don't fork into the background
-p, --pid-file LOCATION write a PID file to LOCATION

Report bugs to bug-httptunnel@gnu.org.


=============================================================
위 처럼 hts 실행되면 정상.. 매우간단하다.

#hts -F 0.0.0.0:22 8080

윈도우나 다른 클라이언트에서는 아래 처럼 접속하면 된다.
> htc --forward-port 2000 서버ip:8080

위에서 port 번호 2000은 htc를 실행하는 pc에 2000포트로 Listener를 오픈해놓게 된다.