Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Mapping a port on another one
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
LonelyStar
Guru
Guru


Joined: 06 Dec 2005
Posts: 390

PostPosted: Wed Feb 06, 2008 11:33 am    Post subject: Mapping a port on another one Reply with quote

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
View user's profile Send private message
Januszzz
Guru
Guru


Joined: 04 Feb 2006
Posts: 367
Location: Opole, Poland

PostPosted: Wed Feb 06, 2008 2:02 pm    Post subject: Reply with quote

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
View user's profile Send private message
LonelyStar
Guru
Guru


Joined: 06 Dec 2005
Posts: 390

PostPosted: Wed Feb 06, 2008 2:14 pm    Post subject: Reply with quote

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
View user's profile Send private message
JeliJami
Veteran
Veteran


Joined: 17 Jan 2006
Posts: 1086
Location: Belgium

PostPosted: Wed Feb 06, 2008 2:25 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum