Gnus development mailing list
 help / color / mirror / Atom feed
* tunneling nntp connection
@ 2000-10-31 13:28 Paul Stevenson
  2000-10-31 13:51 ` Karl Kleinpaste
  2000-10-31 13:51 ` Stainless Steel Rat
  0 siblings, 2 replies; 11+ messages in thread
From: Paul Stevenson @ 2000-10-31 13:28 UTC (permalink / raw)


Hello,
apologies for using the list, not the newsgroup, but since posting via
NNTP is tricky, this is the easiest way:

One may only post messages to the news-server here via one machine.
It is not the machine I run emacs and gnus on.  From my machine I can
read news, which is what I do.  When I want to post, I log on to an
old account on the other side of the world and post from there, which
is silly.

What I'd like to be able to do, is post by having gnus rsh to machine
x, and then telnet news.machine nntp from there. I thought using
nntp-open-rlogin might be what I want but it seems to imply I need
shell access on the same machine which hosts the news server?

Ideally I'd like to continue reading by connecting to the same
newsserver directly, but I don't suppose support for such an odd
request is yet present...

-- 
.  Dr Paul Stevenson   .   Reasearch Fellow   .   University of Surrey  .
.     phone: +44 (0) 1483 876795     .     fax +44 (0) 1483 876781      .
.    p.stevenson@surrey.ac.uk  .  http://www.ph.surrey.ac.uk/~phs3ps    .
.                           I dream in beige                            .



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: tunneling nntp connection
  2000-10-31 13:28 tunneling nntp connection Paul Stevenson
@ 2000-10-31 13:51 ` Karl Kleinpaste
  2000-10-31 14:50   ` Randal L. Schwartz
  2000-10-31 15:03   ` Paul Stevenson
  2000-10-31 13:51 ` Stainless Steel Rat
  1 sibling, 2 replies; 11+ messages in thread
From: Karl Kleinpaste @ 2000-10-31 13:51 UTC (permalink / raw)


Use an ssh tunnel:
ssh -g -q -f -x -L8787:localhost:119 other.host sleep 1000000
Then you use port 8787 on localhost to reach other.host's port 119.



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: tunneling nntp connection
  2000-10-31 13:28 tunneling nntp connection Paul Stevenson
  2000-10-31 13:51 ` Karl Kleinpaste
@ 2000-10-31 13:51 ` Stainless Steel Rat
  2000-10-31 14:14   ` Peter Makholm
                     ` (2 more replies)
  1 sibling, 3 replies; 11+ messages in thread
From: Stainless Steel Rat @ 2000-10-31 13:51 UTC (permalink / raw)


Step one: use SSH.  You don't want passwords bouncing around in the clear.

Step twp: use Netcat (nc).  It works like telnet except that it is totally
clean and transparent.

Step three:
  (setq gnus-select-method
	'(nntp "news.gweep.net"
	       (nntp-address "sidehack.gweep.net")
	       (nntp-open-connection-function nntp-open-rlogin)
	       (nntp-end-of-line "\n")
	       (nntp-rlogin-program "ssh")
	       (nntp-rlogin-parameters
		("bin/nc" "news.gweep.net" "nntp"))))
  (setq gnus-secondary-select-methods nil)

Where "bin/nc" is the path to the netcat executable on the news server.
-- 
Rat <ratinox@peorth.gweep.net>    \ Do not taunt Happy Fun Ball.
Minion of Nathan - Nathan says Hi! \ 
PGP Key: at a key server near you!  \ 



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: tunneling nntp connection
  2000-10-31 13:51 ` Stainless Steel Rat
@ 2000-10-31 14:14   ` Peter Makholm
  2000-10-31 15:05     ` Stainless Steel Rat
  2000-10-31 14:44   ` Jake Colman
  2000-10-31 15:07   ` Paul Stevenson
  2 siblings, 1 reply; 11+ messages in thread
From: Peter Makholm @ 2000-10-31 14:14 UTC (permalink / raw)


Stainless Steel Rat <ratinox@peorth.gweep.net> writes:

> Step one: use SSH.  You don't want passwords bouncing around in the clear.

I use rsh (and curses a lot when I try running gnus from a hpux (where
rsh is restricted shell)) and that works too. It depends how secure
you inner network is.

> Step twp: use Netcat (nc).  It works like telnet except that it is totally
> clean and transparent.

Why nc instead of telnet? Any reasons except that it is a more minimal
solution to the problem (which is a quite good reason if you ask me)

-- 
"If I had been brought up in a different time [...] perhaps I'd
 be totally comfortable in ML and would find C unsafe, a little 
 dangerous, not very expressive."             - Brian Kernighan
                         



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: tunneling nntp connection
  2000-10-31 13:51 ` Stainless Steel Rat
  2000-10-31 14:14   ` Peter Makholm
@ 2000-10-31 14:44   ` Jake Colman
  2000-10-31 15:07   ` Paul Stevenson
  2 siblings, 0 replies; 11+ messages in thread
From: Jake Colman @ 2000-10-31 14:44 UTC (permalink / raw)



I have a similar situation and, although I RTFM, I cannot solve it.  My ISP's
remote newsserver can currently only be accessed from a specific machine on
my local network.  How do I configure gnus to first login to this other local
machine and then to access the remote nntp from that machine?

I've tried the both of the following:

      '(nntp "Globix"
             (nntp-address "delaware")  ; machine on local network
             (nntp-end-of-line "\n")
             (nntp-open-connection-function nntp-open-rlogin)
             (nntp-rlogin-parameters "telnet" "news.globix.net" "nntp")

      '(nntp "Globix"
             (nntp-address "delaware")  ; machine on local network
             (nntp-end-of-line "\n")
             (nntp-open-connection-function nntp-open-telnet)
             (nntp-telnet-parameters "telnet" "-8" "news.globix.net" "nntp")

What am I doing wrong?

TIA!

-- 
Jake Colman                     

Principia Partners LLC                  Phone: (201) 946-0300
Harborside Financial Center               Fax: (201) 946-0320
902 Plaza II                           Beeper: (800) 928-4640
Jersey City, NJ 07311                  E-mail: colman@ppllc.com
                                       E-mail: jcolman@jnc.com
                                          web: http://www.ppllc.com

microsoft: "where do you want to go today?"
linux:     "where do you want to go tomorrow?"
BSD:       "are you guys coming, or what?"



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: tunneling nntp connection
  2000-10-31 13:51 ` Karl Kleinpaste
@ 2000-10-31 14:50   ` Randal L. Schwartz
  2000-10-31 15:03   ` Paul Stevenson
  1 sibling, 0 replies; 11+ messages in thread
From: Randal L. Schwartz @ 2000-10-31 14:50 UTC (permalink / raw)
  Cc: ding

>>>>> "Karl" == Karl Kleinpaste <karl@charcoal.com> writes:

Karl> Use an ssh tunnel:
Karl> ssh -g -q -f -x -L8787:localhost:119 other.host sleep 1000000
Karl> Then you use port 8787 on localhost to reach other.host's port 119.

You don't need the huge sleep if you launch it within the actual
connection.  Here's what I use:

(setq
 gnus-select-method '(nntp "news.telemumble.com"
			   (nntp-address "localhost")
			   (nntp-port-number 11901)
			   (nntp-prepare-server-hook
			    (lambda nil "tunnel prepare"
			      (call-process "ssh" nil 0 nil "-f" "-q"
					    "-L" "11901:news.oneblame.com:119"
					    "telemumble.com" "exec" "sleep" "60")
			      (sit-for 3)))))



-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: tunneling nntp connection
  2000-10-31 13:51 ` Karl Kleinpaste
  2000-10-31 14:50   ` Randal L. Schwartz
@ 2000-10-31 15:03   ` Paul Stevenson
  1 sibling, 0 replies; 11+ messages in thread
From: Paul Stevenson @ 2000-10-31 15:03 UTC (permalink / raw)


Karl Kleinpaste <karl@charcoal.com> writes:

> Use an ssh tunnel:
> ssh -g -q -f -x -L8787:localhost:119 other.host sleep 1000000
> Then you use port 8787 on localhost to reach other.host's port 119.

and localhost would be the machine on which I can post but not run
emacs?  Sadly it is also the only machine with no ssh.



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: tunneling nntp connection
  2000-10-31 14:14   ` Peter Makholm
@ 2000-10-31 15:05     ` Stainless Steel Rat
  0 siblings, 0 replies; 11+ messages in thread
From: Stainless Steel Rat @ 2000-10-31 15:05 UTC (permalink / raw)


* Peter Makholm <peter@makholm.net>  on Tue, 31 Oct 2000
| Why nc instead of telnet? Any reasons except that it is a more minimal
| solution to the problem (which is a quite good reason if you ask me)

No stdin EOF problems.  It stays running until the network side closes.
It can pass arbitrary 8-bit data.  No diagnostic output.  Is smaller.  Is
faster.  Lots of other reasons.
-- 
Rat <ratinox@peorth.gweep.net>    \ When not in use, Happy Fun Ball should be
Minion of Nathan - Nathan says Hi! \ returned to its special container and
PGP Key: at a key server near you!  \ kept under refrigeration.



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: tunneling nntp connection
  2000-10-31 13:51 ` Stainless Steel Rat
  2000-10-31 14:14   ` Peter Makholm
  2000-10-31 14:44   ` Jake Colman
@ 2000-10-31 15:07   ` Paul Stevenson
  2000-10-31 15:21     ` Peter Makholm
  2 siblings, 1 reply; 11+ messages in thread
From: Paul Stevenson @ 2000-10-31 15:07 UTC (permalink / raw)


Stainless Steel Rat <ratinox@peorth.gweep.net> writes:

> Step one: use SSH.  You don't want passwords bouncing around in the clear.

I agree, but there is no sshd on the other machine, so I use rsh with
an .rhosts file.  Not ideal, I know.

> Step twp: use Netcat (nc).  It works like telnet except that it is totally
> clean and transparent.
> 
> Step three:
>   (setq gnus-select-method
> 	'(nntp "news.gweep.net"
> 	       (nntp-address "sidehack.gweep.net")
> 	       (nntp-open-connection-function nntp-open-rlogin)
> 	       (nntp-end-of-line "\n")
> 	       (nntp-rlogin-program "ssh")
> 	       (nntp-rlogin-parameters
> 		("bin/nc" "news.gweep.net" "nntp"))))
>   (setq gnus-secondary-select-methods nil)
> 
> Where "bin/nc" is the path to the netcat executable on the news server.

That looks good. I'm slightly loath to eat up more of my miniscule
quota with nc and trying to get it to compile on the sun with no
gcc... but I will if necessary.  I tried telnet first and I can't post
because there is no subject line! Presumably end-of-line is being
garbled.  I guess this is why you recommeded nc...

-- 
.  Dr Paul Stevenson   .   Reasearch Fellow   .   University of Surrey  .
.     phone: +44 (0) 1483 876795     .     fax +44 (0) 1483 876781      .
.    p.stevenson@surrey.ac.uk  .  http://www.ph.surrey.ac.uk/~phs3ps    .
.                           I dream in beige                            .



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: tunneling nntp connection
  2000-10-31 15:07   ` Paul Stevenson
@ 2000-10-31 15:21     ` Peter Makholm
  2000-10-31 16:15       ` Paul Stevenson
  0 siblings, 1 reply; 11+ messages in thread
From: Peter Makholm @ 2000-10-31 15:21 UTC (permalink / raw)


Paul Stevenson <p.stevenson@surrey.ac.uk> writes:

> > 	       (nntp-end-of-line "\n")

> gcc... but I will if necessary.  I tried telnet first and I can't post
> because there is no subject line! Presumably end-of-line is being

Are you sure you remembered this line? It has solved the problem every
time I got that problem. (using a rsh/telnet combination)

-- 
"If I had been brought up in a different time [...] perhaps I'd
 be totally comfortable in ML and would find C unsafe, a little 
 dangerous, not very expressive."             - Brian Kernighan
                         



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: tunneling nntp connection
  2000-10-31 15:21     ` Peter Makholm
@ 2000-10-31 16:15       ` Paul Stevenson
  0 siblings, 0 replies; 11+ messages in thread
From: Paul Stevenson @ 2000-10-31 16:15 UTC (permalink / raw)


Peter Makholm <peter@makholm.net> writes:

> Paul Stevenson <p.stevenson@surrey.ac.uk> writes:
> 
> > > 	       (nntp-end-of-line "\n")
> 
> > gcc... but I will if necessary.  I tried telnet first and I can't post
> > because there is no subject line! Presumably end-of-line is being
> 
> Are you sure you remembered this line? It has solved the problem every
> time I got that problem. (using a rsh/telnet combination)

It was there.  I solved it by compiling nc as richi suggested.  It
turned out to be less hassle than I'd feared.  I'm getting better at
editing makefiles to counter the vagaries of the local system.

Thanks to all for your help.



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2000-10-31 16:15 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-10-31 13:28 tunneling nntp connection Paul Stevenson
2000-10-31 13:51 ` Karl Kleinpaste
2000-10-31 14:50   ` Randal L. Schwartz
2000-10-31 15:03   ` Paul Stevenson
2000-10-31 13:51 ` Stainless Steel Rat
2000-10-31 14:14   ` Peter Makholm
2000-10-31 15:05     ` Stainless Steel Rat
2000-10-31 14:44   ` Jake Colman
2000-10-31 15:07   ` Paul Stevenson
2000-10-31 15:21     ` Peter Makholm
2000-10-31 16:15       ` Paul Stevenson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).