[Wylug-help] Router config problem
Jim Jackson
jj at franjam.org.uk
Thu Aug 23 13:43:10 UTC 2012
Hi Anne,
On Thu, 23 Aug 2012, Anne Wilson wrote:
> On 22/08/12 18:16, Jim Jackson wrote:
> > On Mon, 20 Aug 2012, Anne Wilson wrote:
> >
> >> I've just installed a Netgear N600 modem/router, and I'm having
> >> problems understanding how it handles port forwarding/triggering.
> >> On my old router I accepted calls on a high-numbered port and
> >> forwarded them to the IMAP server:143. The new router does allow
> >> me to set custom services on both the forwarding and the
> >> triggering screens, but I simply can't see how to set it up.
> >>
> >> For Port Forwarding you can add only Service Name Start Port
> >> End Port Server IP Address
> >
> > It looks like you cannot do port translation. You just forward a
> > specific port to an internal IP address. I had an ADSL router like
> > this some while ago, and used a port redirection service on my
> > server to redirect it to the correct port, e.g. redir or the
> > inbuilt port redirection in xinetd.
> >
> I've had Netgear routers in the past and liked many things about them,
> but this particular problem beat me. I thought it was perhaps because
> I had bought the cheaper, consumer units, so this time I paid for
> something that claimed to be "professional", expecting it to have this
> facility. The LinkSys I had last could do it easily, but failed on
> many other counts, including needing frequent reboots.
>
> When you say "a port redirection service on my server" are you
> referring to firewall entries? If so, can you give me a (faked)
> example? I've only ever tackled this at point-of-entry, the router.
Choose your port and set up port forwarding on the router to your machine.
Then either get your imap server to listen on both 143 and your external
port, or set up a service on your server to do port redirection for
your external port back to itself on port 143.
This shows how to do it if you have xinetd running on your server...
http://leonard.lotus-land.ca/scribble/note/706
If you have a "standard" inetd, then you can use netcat (nc) to redirect
ports...
http://29a.ch/2009/5/10/forwarding-ports-using-netcat
or use redir, see this...
http://linux-tips.org/article/69/redirecting-tcp-ports-with-redir
put an entry in /etc/inetd.conf for your external port and set up to
execute nc or redir as a port redirector.
redir man page...
http://linux.die.net/man/1/redir
If your external port is 9143, then you will redirect connections on your
server to this port to 127.0.0.1 port 143
so your inetd.conf entry would be something like...
9143 stream tcp nowait root /usr/sbin/tcpd \
/usr/bin/redir --inetd --syslog --caddr=127.0.0.1 --cport-143
I always run services through tcpd to porvide access control change this to
/usr/bin/redir if you are not using tcpd.
Hope That helps.
Jim
> >
> >>
> >> For Port Triggering it has the screen in the attached .png.
> >>
> >> Am I going about this the wrong way? The LinkSys had External
> >> Port and Internal Port, so it was easy to sort out what it was
> >> looking for. I can't believe this router can't do it, so I must
> >> be missing the obvious somewhere.
> >>
> >> Anne
> >>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.12 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAlA1/FkACgkQj93fyh4cnBcU7ACdH5vOFXMM8PsVolw7OJ9It68D
> q1QAn31lwaxilxpw8Jc/w31/iECGrSD6
> =pkLt
> -----END PGP SIGNATURE-----
>
More information about the Wylug-help
mailing list