|
 |
|
 |
09-12-2002, 11:40 AM
|
#1 (permalink)
|
|
Moderator
Join Date: May 2002
Location: us.ca
Posts: 4,444
|
re-routing info to another port?
I would like to use apple remote desktop from work. the problem is that it only communicates on port 3704 ( or something like that ) .. anyhow, it is a port that i can not communicate with from behind the firewall here at work.
is there a way to convert 1 port to another port in linux? kinda like how links work? except with ports?
it's a stretch, i know.
|
|
|
09-12-2002, 05:05 PM
|
#2 (permalink)
|
|
Centurion Nova Prime
Join Date: May 2002
Location: Oak Park, IL (USA)
Posts: 285
|
I've never tried this, but I believe you can use ssh to do what you want with TCP/IP forwarding. Check out the man page and/or do a google search for the details. If you figure it out, post the solution. I would be curious about the details myself.
|
|
|
09-13-2002, 07:53 AM
|
#3 (permalink)
|
|
Moderator
Join Date: May 2002
Location: us.ca
Posts: 4,444
|
thanks, i'll check it out.
|
|
|
09-13-2002, 10:46 AM
|
#4 (permalink)
|
|
Newbie
Join Date: Jun 2002
Location: Denmark
Posts: 1,692
|
Are you thinking about iptables and DNAT ??
# iptables -t nat -A PREROUTING -i $EXTERN_NIC -p tcp --dport 23 -j DNAT --to 172.16.0.2:3704
Or some sort of REDIRECT of the connection ?
# iptables -t nat -A PREROUTING -p tcp --dport 23 -j REDIRECT --to-port 3704
The first one will redirect every connection comming to the firewall from the outside on port 23, to the internal IP on port 3704, the second one will redirect every connection on the machine comming on port 23, to port 3704 on the same machine.
|
|
|
09-13-2002, 08:30 PM
|
#5 (permalink)
|
|
Centurion Nova Prime
Join Date: May 2002
Location: Oak Park, IL (USA)
Posts: 285
|
That's cool, Redhead! You remind me of how little I know about some of this stuff. I went ahead and did a search on ssh and this is what I found (a snippet from a thread on the subject):
localhost:~> ssh -L 20110:mail.domain.com:110 mail.domain.com
What that does is is ssh me into mail.domain.com, redirecting localhost
port 20110 to port 110 on mail.domain.com.
In other words, you connect to 20110 (or whatever) on your local machine and ssh forwards that to port 110 on the remote machine. There's no configuration required on the sshd side. Again, I haven't tried it, but I had heard that this was fairly common.
|
|
|
09-13-2002, 10:25 PM
|
#6 (permalink)
|
|
Newbie
Join Date: Jun 2002
Location: Denmark
Posts: 1,692
|
Oh, just a simple ssh-tunneling thing.. Well that is widely used, for secure pop3 connections and the like..
I thought it had something todo with a firewall only having port X open, but the proggy you wanted connected to, was expecting connection on port Y, so therefor either letting the firewall re-route any incomming connection on port X to port Y on the client, or (if the client had an external IP, but still behind the firewall) letting the client redirect connections comming on port X to its own port Y.
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -8. The time now is 12:49 PM.
|
Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting
|
 |
|