請問如何做 port mapping? - Linux

By Mia
at 2006-12-01T20:26
at 2006-12-01T20:26
Table of Contents
※ 引述《in3 (in3)》之銘言:
: 請問一下如何做 port mapping?
: 我目前有二台主機
: A主機 192.168.0.1
: B主機 192.168.0.2
: 如果我想用ssh連時 把192.168.0.1的port 1234
: 轉到 192.168.0.2:22。
: 請問有人知道怎麼做嗎?^^
: 或是提示我一些key word ,讓我google一下
: 謝謝 ^^
: ----
不知你的系統是什麼?
[root@appleboy-dorm][~][20:20:32]# apt-cache search ^redir
redir - Redirect TCP connections
apt-get install redir
裝好之後 就可以使用了
redir --lport=1234 --cport=22 --caddr=192.168.0.2 &
這樣就可以達到你要的功能 iptables 也可以
也可以用 tarball 安裝 http://sammy.net/~sammy/hacks/
安裝方式很容易~ 下載軟體 解壓縮 make 之後 就會產生執行檔
然後在把執行檔 複製到 /usr/sbin/底下 就好
--
********************************************************
* Appleboy Blog *
* http://blog.Wu-Boy.com/ *
* Appleboy Album *
* http://www.wretch.cc/album/appleboy *
********************************************************
--
: 請問一下如何做 port mapping?
: 我目前有二台主機
: A主機 192.168.0.1
: B主機 192.168.0.2
: 如果我想用ssh連時 把192.168.0.1的port 1234
: 轉到 192.168.0.2:22。
: 請問有人知道怎麼做嗎?^^
: 或是提示我一些key word ,讓我google一下
: 謝謝 ^^
: ----
不知你的系統是什麼?
[root@appleboy-dorm][~][20:20:32]# apt-cache search ^redir
redir - Redirect TCP connections
apt-get install redir
裝好之後 就可以使用了
redir --lport=1234 --cport=22 --caddr=192.168.0.2 &
這樣就可以達到你要的功能 iptables 也可以
也可以用 tarball 安裝 http://sammy.net/~sammy/hacks/
安裝方式很容易~ 下載軟體 解壓縮 make 之後 就會產生執行檔
然後在把執行檔 複製到 /usr/sbin/底下 就好
--
********************************************************
* Appleboy Blog *
* http://blog.Wu-Boy.com/ *
* Appleboy Album *
* http://www.wretch.cc/album/appleboy *
********************************************************
--
Tags:
Linux
All Comments

By Thomas
at 2006-12-02T14:47
at 2006-12-02T14:47
Related Posts
Linux系統備份的好工具

By Sierra Rose
at 2006-10-05T15:21
at 2006-10-05T15:21
RT2500 driver trace心得

By Hamiltion
at 2006-09-04T01:04
at 2006-09-04T01:04
Audit Subsystem trace心得

By Jake
at 2006-08-21T00:17
at 2006-08-21T00:17
彩色 shell 設定

By Ida
at 2006-08-13T04:07
at 2006-08-13T04:07
grub教學

By Rosalind
at 2006-07-25T23:26
at 2006-07-25T23:26