wget http://www.boutell.com/rinetd/http/rinetd.tar.gz
解壓安裝ide
tar zxvf rinetd.tar.gz make make install 執行make install時可能出現錯誤:缺乏目錄/usr/man/man8,此時執行 makedir -p /uar/man/man8便可
編輯配置code
vi /etc/rinetd.conf #(文件本身建立) 0.0.0.0 19991 10.4.41.33 22 0.0.0.0 19992 10.4.42.33 22 #將全部發往本機19991端口的請求轉發到10.4.41.33 的22端口 #將全部發往本機19992端口的請求轉發到10.4.42.33 的22端口
啓動程序進程
pkill rinetd ##關閉進程 rinetd -c /etc/rinetd.conf ##啓動轉發