1 |
On Tuesday 19 February 2008, Mick wrote: |
2 |
|
3 |
> > Does your mail server at home have a real ip address? You can do |
4 |
> > |
5 |
> > ssh -l <username> -p 443 -N ssh.server.address -L |
6 |
> > localport:mail.server.address:remoteport |
7 |
> > |
8 |
> > And you don't need to worry about setting up forwarding rules on the |
9 |
> > router. |
10 |
> |
11 |
> The mail server is on the Internet, not accessible by ssh. I intended |
12 |
> to use the router to bounce the ssh connection and forward it to the |
13 |
> mail server. |
14 |
> |
15 |
> laptop --> |firewall| --> router --> mailserver |
16 |
> ssh ssh ssl |
17 |
> |
18 |
> Essentially, thinking of using the router as a proxy server. |
19 |
|
20 |
Ok, then Willie's command will work just fine, provided that *ssh* |
21 |
connections to port 443 or 80 of your router work (and of course, that |
22 |
your router can in turn reach the mail server on the necessary ports). |
23 |
|
24 |
ssh -p 443 -L 1234:mail.server:25 -L 5678:mail.server:110 you@router |
25 |
|
26 |
Would open ports 1234 and 5678 on localhost for sending and receiving |
27 |
mail respectively. If your mail server uses SSL, the use the |
28 |
corresponding ports (995 and/or 587 or whatever). |
29 |
|
30 |
What you send to port 1234 on localhost will be forwarded by ssh to your |
31 |
router, and the router will forward the data to the mail server, port |
32 |
25. The same for port 5678. |
33 |
|
34 |
Note that the connection between your computer and the router is through |
35 |
ssh, to port 443 of the router. This is the only connection you'll pass |
36 |
through the firewall, and through which all the forwarded ports will |
37 |
flow. |
38 |
-- |
39 |
gentoo-user@l.g.o mailing list |