rinetd和privoxy使用端口轉發將本機http proxy共享給局域網其他電腦和手機使用。網上有不少privoxy的配置詳解,但對rinetd卻知之甚少,在這裡講述。以下操作系統為Debian 8.
1.安裝
打開terminal,然後su命令輸入root密碼切換到root賬戶,apt-get update && apt-get install rinetd.
2.配置
打開rinetd配置文件,已安裝gnome的可以用gedit代替nano,
nano /etc/rinetd.conf
#
# this is the configuration file for rinetd, the internet redirection server
#
# you may specify global allow and deny rules here
# only ip addresses are matched, hostnames cannot be specified here
# the wildcards you may use are * and ?
#
# allow 192.168.2.*
# deny 192.168.2.1?
#
# forwarding rules come here
#
# you may specify allow and deny rules after a specific forwarding rule
# to apply to only that forwarding rule
#
# bindadress bindport connectaddress connectport
0.0.0.0 1234 127.0.0.1 10000
# logging information
logfile /var/log/rinetd.log
# uncomment the following line if you want web-server style logfile format
# logcommon
藍色字體為字體內容,0.0.0.0:1234表示監聽本機1234端口,你也可以改成你電腦任意未使用的端口,127.0.0.1:10000意思是要轉發的端口也就是本機所使用的http proxy端口。
保存後重啟rinetd
/etc/init.d/rinetd restart
windows系統只需上官網下載安裝,配置與上面大同小異。
配置成功即可將其他電腦和手機中設置proxy server和端口即可。
沒有留言:
發佈留言