banner

[Rule] Rules  [Home] Main Forum  [Portal] Portal  
[Members] Member Listing  [Statistics] Statistics  [Search] Search  [Reading Room] Reading Room 
[Register] Register  
[Login] Loginhttp  | https  ]
 
Forum Index Thảo luận hệ điều hành *nix Linux tunneling  XML
  [Article]   Linux tunneling 17/07/2006 01:15:17 (+0700) | #1 | 7229
[Avatar]
tranvanminh
HVA Friend

Joined: 04/06/2003 06:36:35
Messages: 516
Location: West coast
Offline
[Profile] [PM]
Apr 15th 2006

Table of Contents

1 . First
2 . Install
3 . Configuration
4 . Use
5 . Reference

First :
Khi sử dụng môi trường net của trường hoặc của công ty chúng ta gặp không ít khó khăn . bài viết này sẽ giới thiệu cho bạn đọc sử dụng chương trình httptunnel để khắc phục những giới hạn trong các môi trường đó .
bài viết sẽ chú trọng việc tạo tunnel khi client nằm sau proxy của các môi trường như trên và để tránh khỏi những giới hạn từ proxy của các môi trường đó .


Mô hình tunnel trong bài viết :
bmuht_fig.76252_9917744031946595406781be0c952956/6/8/6002/daolpu/enilnoavh/ten.murofavh.www//:ptth


Ngoài httptunnel , còn có rất nhiều loại tunnel trên linux như

* stone http://www.gcd.org/sengoku/stone/
* Zebedee http://www.winton.org.uk/zebedee/
* stunnel http://stunnel.mirt.net/
* sslwrap http://www.quiltaholic.com/rickk/sslwrap/
* OpenSSH http://www.openssh.org/

Ngoài httptunnel cá nhân tôi rất thích sử dụng chương trình tưunel stone , trong thời gian tới tôi sẽ viết bài giới thiệu cách sử dụng của stone .

2 . Install (from readme in package)

1. `cd' to the directory containing the package's source code and type

`./configure' to configure the package for your system. If you're

using `csh' on an old version of System V, you might need to type

`sh ./configure' instead to prevent `csh' from trying to execute

`configure' itself.

Running `configure' takes awhile. While running, it prints some

messages telling which features it is checking for.

2. Type `make' to compile the package.

3. Optionally, type `make check' to run any self-tests that come with

the package.

4. Type `make install' to install the programs and any data files and

documentation.

5. You can remove the program binaries and object files from the

source code directory by typing `make clean'. To also remove the

files that `configure' created (so you can compile the package for

a different kind of computer), type `make distclean'. There is

also a `make maintainer-clean' target, but that is intended mainly

for the package's developers. If you use it, you may have to get

all sorts of other programs in order to regenerate files that came

with the distribution. 


3 . Configuration

Trên server bên ngoài bạn dùng lệnh

Code:
$hts -F localhost:22 8888


Trên windows từ xa bạn dùng lệnh sau để establish connection với server

$ htc -F 2222 -P ccproxy2.company.ac.jp:10080 221.222.222.22:8888 


* -P ccproxy2.company.ac.jp:10080 là proxy

* 221.222.222.22:8888 là máy chủ của mình đã config bước trên server bên ngoài

4 . Use

Cách kết nối đến tunnel server trên linux

Code:
[inhost]$ ssh -p 2222 -l username localhost

* username là user của bạn trong server (outside)

* localhost là host server của bạn

Cách kết nối đến tunnel server trên windows

Download client của httptunnel trên nền Windows tại .
http://userpages.umbc.edu/~tmoses1/hypertunnelNT.zip

giải nén và khởi động chương trình trên DOS và dùng lệnh .

Code:
$ htc -F 2222 -P ccproxy2.company.ac.jp:10080 221.222.222.22:8888


sau đó dùng chương trình putty (hoặc các chương trình giống putty) kết nối đến server

Code:
Địa chỉ : localhost
Port     : 8888


-----------------------

Có vài người bạn tôi có làm theo hướng dẫn như bị thất bại . tôi xin đưa ra những trường họp thường xãy ra và giải pháp của chúng .

1 . Firewall chưa mở .

giải pháp : Allow các packet đi vào từ port 8888

2 . Trong hosts.alllow không set allow 127.0.0.1 .

giải pháp : mở file /etc/hosts.alllow và thêm vào như sau

All : 127.0.0.1

3. Chỉ định tunnel server sai địa chỉ của sshd daemon .

phần giới thiệu trên tôi đã viết là

Code:
$hts -F localhost:22 8888


nếu bạn không biết được ssh deamon đang listen tại đia chị nào , trong trường họp này , mở file /etc/ssh/sshd_config kiếm đến dòng

Code:
ListenAddress 192.168.11.5:22


từ địa chỉ trên , ta đã xác thực được ssh daemon listen trên địa chỉ 192.168.11.5 và port 22 , từ đó , ta có thể đổi lại server của httptunnel listen trên địa chỉ này với dòng lệnh sau để cho tương ứng .


Code:
$hts -F 192.168.11.5:22 8888



5 . Reference


Official home page :
http://www.nocrew.org/software/httptunnel.html
FAQ :
http://www.nocrew.org/software/httptunnel/faq.html
Other sites :
http://www.hirochan.org/freebsd/setup/httptunnel.html (copy mô hình trên)


Tác giả : 777
Nguồn : vnhacker.org
[Up] [Print Copy]
[digg] [delicious] [google] [yahoo] [technorati] [reddit] [stumbleupon]
Go to: 
 Users currently in here 
1 Anonymous

Powered by JForum - Extended by HVAOnline
 hvaonline.net  |  hvaforum.net  |  hvazone.net  |  hvanews.net  |  vnhacker.org
1999 - 2013 © v2012|0504|218|