View previous topic :: View next topic |
Author |
Message |
LonelyStar Guru
Joined: 06 Dec 2005 Posts: 390
|
Posted: Wed Feb 06, 2008 11:33 am Post subject: Mapping a port on another one |
|
|
Hello,
I have a vServer with gentoo on it.
I am sending mail over it by connecting to the smtp running on port 25.
But from some locations (university i.E.) I am unable to connect to port 25 (other ports work, I guess they do not want me to send spam-mails).
Of course, the smtp must continue running on port 25
So my question:
Can I somehow map some other port (port 26 i.E.) onto port 25?
So that when I connect to port 26, it's the same as connection to port 25?
Thanks!
nathan |
|
Back to top |
|
|
Januszzz Guru
Joined: 04 Feb 2006 Posts: 367 Location: Opole, Poland
|
Posted: Wed Feb 06, 2008 2:02 pm Post subject: |
|
|
Sure. You can use port forwarding and this can be obtained via several methods:
- netfilter configuration,
- netcat,
- gre tunnels I guess also?
- ssh.
The easiest for you will be ssh. Remember - you have to start it every time machine reboots:
ssh -f -N -L *:26:localhost:25 -l root localhost
That should do the trick |
|
Back to top |
|
|
LonelyStar Guru
Joined: 06 Dec 2005 Posts: 390
|
Posted: Wed Feb 06, 2008 2:14 pm Post subject: |
|
|
Hi,
Thanks for your reply. There is a problem with the ssh methode. It makes a difference for smtp if I connect from localhost or from a foreign host. From localhost I can send mails to anyone without authentification. From a foreign host I can only send mails to local users.
I have to familiarizes myself with the suggestions in your list.
Greetings,
Nathan |
|
Back to top |
|
|
JeliJami Veteran
Joined: 17 Jan 2006 Posts: 1086 Location: Belgium
|
Posted: Wed Feb 06, 2008 2:25 pm Post subject: |
|
|
You can also use xinetd to redirect to a different port.
Put xinetd in your default runlevel, and it will redirect at every boot.
Big advantage is that this method is session-less: every connection is a new connection. _________________ Unanswered Post Initiative | Search | FAQ
Former username: davjel |
|
Back to top |
|
|
|