On Sat, Jan 1, 2011 at 17:26, Minh Van Le wrote:
> How do I establish a connection where the localhost IP are both in the
> "Local Address" and "Foreign Address" columns of netstat ?
>
> Eg.,
>
> =
> [r...@j8 xinetd.d]# netstat -A inet -n
> Active Internet connections (w/o servers)
> Proto Recv-Q Send-Q Local Address Foreign Address
> State
> tcp 0 0 192.168.1.8:57246 192.168.1.8:6667
> ESTABLISHED
> =
>
> (where "192.168.1.8" is my localhost's IP address).
>
> The reason I want to do this is because I want to test my authd (ident
> server) after installing the package in Fedora 13.
> "/usr/share/doc/authd-1.4.3/README.html" says:
>
> =
> Testing
>
> 2. Run "netstat -A inet -n" and find an established tcp
> connection.
> 3. Input the two ports prefixed with colons as single command line
> argument (no whitespace unless the entire pair is enclosed in
> quotes for the command line parser), in the same order,
> separated by a comma. Example:
>
> $ /usr/sbin/in.inetd 33201,6667
>
> 4. Execute "telnet localhost auth" and type the two ports separated
> by a comma. The two ports selected must have a foreign address
> of localhost, or 127.0.0.1 as well as a matching local address.
> If they do not, a NO-USER error will be returned.
>
> =
>
> But I can't seem to get a port pair for localhost.
You have not included the commands you've run and their output. Eg,
did you try the telnet command, if so, what was your error message or
output/ result?
Eg if you are running an apache server on port 80, you could run:
In terminal 1 (don't exit the telnet command):
$ telnet localhost 80
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Now in terminal 2:
$ netstat -A inet -n
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp0 0 127.0.0.1:80127.0.0.1:47597 SYN_RECV
tcp0 0 127.0.0.1:47597 127.0.0.1:80ESTABLISHED
As you can see, netstat gives me the last line above.
Is that what you want?
Good luck
Zen
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html