book graphic unix and linux troubleshooting guide

My Troubleshooting E-Book will show you how to solve tough problems on Linux and Unix systems!







Explaining SOCKS vs. NAT


What is this stuff?

If this isn't exactly what you wanted, please try our Search (there's a LOT of techy and non-techy stuff here about Linux, Unix, Mac OS X and just computers in general!):



From - Thu Jun 10 16:20:26 1999
Xref: world comp.unix.sco.misc:98584
Path: world!newsfeed.mathworks.com!logbridge.uoregon.edu!feeder.nmix.net!198.59.136.4.MISMATCH!feeder.swcp.com!news.cyberport.com!not-for-mail
From: tangentSPAMCATCHER@cyberport.com (Warren Young)
Newsgroups: comp.unix.sco.misc
Subject: Re: Oddball Networking Question
Date: Thu, 10 Jun 1999 20:18:54 GMT
Organization: ETR..., Inc.
Lines: 96 Message-ID: <37600b35.2953125@news.cyberport.com> References: <eH_63.480$%a7.61575@news.uswest.net> <7jjj2d$mi1$1@ionews.ionet.net> <fIh73.369$N3.35953@news.uswest.net> <375E2645.B54F526E@ilion.nl>
NNTP-Posting-Host: 56k160-118.cyberport.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: macaw.cyberport.com 929045942 17068 204.134.118.160 (10 Jun 1999 20:19:02 GMT)
X-Complaints-To: abuse@cyberport.com
NNTP-Posting-Date: 10 Jun 1999 20:19:02 GMT
X-Newsreader: Forte Agent 1.5/32.451
X-Mozilla-Status: 8011


Hate these ads?



Tony Earnshaw <tonye@ilion.nl> wrote the following, proving once again
that the fastest way to get a question answered correctly on Usenet is
to post the wrong answer:



>Larry McFarlane wrote:
>
>internal net and one on the Internet. It uses NEC's socks5 proxy,
>compiled to support threaded mode (light weight processes) to minimize
>use of resources (CPU and memory). It translates requests from the IP
>number of each client to the IP number of the Internet NIC and back
>again for incoming packets. This is variously known as NAT and IP
>Masquerading. It'll give you what you want, most probably, including
>Quake.














SOCKS is not masquerading or NAT -- it's proxying.  The difference is
that with a proxy, one computer asks another to do something for it;
the proxy does what you ask, and returns the results.  In the case of
SOCKS, the clients open special connections to the SOCKS server,
asking it to open the "real" connection to the remote server.  The
SOCKS server acts as a relay, translating between HTTP or whatever on
the outbound leg to SOCKS on the inbound leg.



IP masquerading is one type of NAT where one of the network's members
(usually a gateway) translates the addresses in the packets it
receives as part of its gateway duties based on some rule.  The simple
example is that all "internal" addresses are translated to the one
outbound address.  The masquerading box also translates IP port
numbers, which it uses to de-multiplex incoming replies, so it can
send them on to the proper internal machines.



This difference is important for a number of reasons.  First, to use a
proxy, a program must have specific support for it.  NEC's SOCKSCap
lets you get around this limitation by getting in between a
SOCKS-ignorant program and the platform's network API in order to
translate the calls.  


ad



Still, even with a SOCKSifier, you can run into limitations.  For
example, classic FTP doesn't work through a SOCKSifier due to the way
the protocol works -- you have to use the so-called "passive" mode of
FTP.  Chat, game and multimedia protocols are also notorious for not
working through dumb SOCKSifiers.  (This is as opposed to smart
SOCKSifiers which know the protocols in question and can re-write the
data stream on the fly to make it work.)



Masquerading, on the other hand, works with nearly everything, because
it's transparent to the application.  In the few cases where standard
masquerading doesn't work, there are usually smart stream re-writers
available that work at the gateway, rather than requiring trickery on
the client.



As mentioned in other parts of this thread, Linux and other operating
systems have good masquerading support already.  I've run NEC SOCKS
myself (both on Linux and on NT), and while it works well for a
limited set of applications (albeit the most important subset), it
isn't nearly as foolproof as masquerading.  I wouldn't go back for
anything.









Don't discard the Linux option: you can easily set up a dedicated,
headless 486 for this, and then put the SCO box behind the
masquerading box along with the Windows boxes.  We're running a
UnixWare box here at work that sits behind a 486/66 Linux box with 16
MB of RAM and a 500 MB hard drive along with an assortment of half a
dozen other machines (Win9x, WinNT, more Linux).  It all works
beautifully, and the Linux box's idle time only goes below 95% when
it's booting.  B-)



Also note that with Linux 2.2, the packet-filtering code makes for a
very good firewall.  I can send you a script that will both turn on
masquerading and set up a nearly bulletproof firewall.  (Bulletproof
by dint of not allowing hardly any incoming connections or ICMP/UDP
requests.  Once you start responding to inbound requests,
bulletproofness becomes just a wee bit harder to achieve.  B-) )



>NEC's socks5 proxy has to be obtained as source code from NEC's site,
>and you'll have to compile it and configure it yourself to suit your own
>needs. No socks4 proxy servers support UDP connections, there are other
>socks5 servers than NEC's that support a full range of UDP services
>(e.g. the Norwegian Dante). NEC also supplies a commercial version of
>its socks5 server, but you probably won't want to pay for it.



You left out a few things here:



1. The URL: www.socks.nec.com



2. You imply that the free version of the socks5 server is commercial,
and you'll need that to do UDP.  In fact the free version is fully
socks5-compliant -- it's the reference implementation of SOCKS, after
all.



My advice: go ahead and try SOCKS, but I'll bet you'll find that Quake
won't work through it, and that you'll find the SOCKSifying hassle
required with other applications more trouble than it's worth.



Good luck,



= Warren -- http://www.cyberport.com/~tangent/









Enter your email address for automatic notification of new posts here
(be sure to whitelist 'feedburner.com' if you use spam filtering)

Or use any RSS reader

Delivered by FeedBurner


ad

Views for this page
Today This Week This Month This Year  Overall
151111 1,983

/Bofcusm/56.html copyright 1997-2004 (various authors) All Rights Reserved

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

More:
       - Networking




Unix/Linux Consultants


http://www.cleverminds.net Need expert advice? Want a second opinion? CleverMinds is a one-stop-shop for a wide range of technology solutions. We support Unix, Linux, SCO as well as CMS, ecom, blogs, podcasts, search engines consulting and more. Contact us at web2.0@cleverminds.net 0r (617) 894-1282


http://echo3.net/ Unix/Linux Custom Applications, Web Hosting, C/C++ Programming Courses


http://thatitguy.com Business networking servers, Linux and Unix experts. In business since 1997! Windows and Exchange to Samba and Scalix migration experts.



Twitter
o When an email ends with "God Bless America", the rest is almost always ignorant, reactionary junk. Not that I need to read to the end. 7:35 AM Apr 16th 2008




card_image







Change Congress