⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 proxy-linux.html

📁 Linus guide, Linus guide, Linus guide,
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"><html><head>	<title>Using SOCKS Proxy Firewalls on Linux</title>	<meta name="Description" content="A document on how to configure a Linux machine to use SOCKS proxy firewalls.">	<meta name="Keywords" content="proxy, SOCKS5, firewall, Linux"></head><body bgcolor="#FFFFFF" text="#000000" LINK="#0000FF" VLINK="#7F007F"><h2>Using SOCKS Proxy Firewalls on Linux</h2>  <font size="-1">    <b>Written by: Alex Feinberg (<a href="mailto:alex@freethinkers.net">alex@freethinkers.net</a>)</b><br>    <b>Created on: December 24, 1998</b><br>    <b>Last updated: December 29, 1998</b><br>    <b>Development stage: Alpha</b><br>  </font> <p> Many companies are now turning to Linux as a solution for cheap and reliable  workstations. Many times they set those machines up right at employee's houses, so they can "tele-commute" to work. If you are in that situation, chances are your network is behind a <i>firewall</i>. Usually companies use <i>socks</i>-type proxy  firewalls. Those firewalls allow for safety, monitoring yet reasonable privacy as well. However, you can't use many of those neat network applications such as IRC clients, e-mailers, news readers, FTP clients, telnet to outside the corporate network. This is a guide for those wanting to use the firewall to access outside machines with programs that don't readily support socks. This is also a guide for system administrators for configuring new machines, as all of this would apply to most any other Unix as well, with few differences. </p> <p> First part is find out whether we have socks5 or socks4. Good idea is to ask the system administrator, or just do trial tests. Socks5 is the best protocol, let's try it first if we don't know whether we have socks5 or socks4. Also, if your firewall is <i>wingate</i>, it's socks5. If it's a unix machine, it's probably socks5, but it might be socks4 as well. Now we need to determine the hostname of the firewall machine. Just check the settings in Netscape or other web browser on your work  machine. </p> <p> Now we know the name of the server. We should now get the package itself so it all works. Like I said earlier, first let's try socks5, because it's better and most likely to be there. Download socks5 libraries with Netscape (which readily supports socks without any work) from ftp://ftp.nec.com/pub/socks/socks5. Download the tar.gz package extract it (with tar zxvf file.tar.gz), cd to the directory formed. There run ./configure; make; make install. All done! If these steps went fine, we've  compiled the libraries! Now we need to configure the libraries to work with your network. All we do is edit <tt>/etc/libsocks5.conf</tt>. Here's what mine looks like: </p> <br><pre> noproxy - 1.2.3. - - socks5 - - - - 1.2.3.4</pre><br> <p> Now let's try to understand what all this means. 1.2.3. is the mask of the  network I am on. This way if I'm using a socksified client to connect to a host inside the network, it won't be going through the firewall. 1.2.3.4 is the firewall itself. Now let's try out the configuration. Use some of the premade clients built with socks5, such as rtelnet. Type rtelnet netscape.com. Wait for a reasonable time (up to ten minutes). Socks connects might be slow. Once it's connected you've done it! Now we can use runsocks to connect "socksify" anything else we want to, simply type runsocks program args. Simple huh? </p> <p> In case we're still socks4, procedure is rather similar. Download socks4 from <tt>ftp://ftp.nec.com/pub/socks/socks4</tt> and build it the same way. Configuring it, however, <b>is</b> different. Here's an example configuration file (<tt>/etc/socks.conf</tt>): </p><br><pre> direct firewall 255.255.255.255 sockd  @=1.2.3.4 0.0.0.0 0.0.0.0  </pre><br>  <p> Not rocket science, huh? Firewall is the hostname of the firewall server, 1.2.3.4 is it's ip. Test it out and use it similarly. </p> <p> For more interesting configuration examples, use examples, problems other things check out <a href="http://www.socks.nec.com">http://www.socks.nec.com</a>. </p><hr><p><b><font size="-1">Copyright &copy; 1998 <a href="mailto:alex@freethinkers.net">Alex Feinberg (alex@freethinkers.net)</a>. All rights reserved. Permission to use, distribute and copy this document is hereby granted. You may modify this document as long as credit to me is given.</font></b></p></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -