Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Go Back   Code Forums > Systems > Linux / BSD / OS X
User Name
Password

Reply
 
LinkBack Thread Tools Display Modes
Old 09-12-2002, 11:40 AM   #1 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,397
sde is on a distinguished road
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.
__________________
sde is offline   Reply With Quote
Old 09-12-2002, 05:05 PM   #2 (permalink)
technobard
Centurion Nova Prime
 
technobard's Avatar
 
Join Date: May 2002
Location: Oak Park, IL (USA)
Posts: 284
technobard is on a distinguished road
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.
__________________
technobard is offline   Reply With Quote
Old 09-13-2002, 07:53 AM   #3 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,397
sde is on a distinguished road
thanks, i'll check it out.
__________________
sde is offline   Reply With Quote
Old 09-13-2002, 10:46 AM   #4 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,680
redhead is on a distinguished road
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.
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote
Old 09-13-2002, 08:30 PM   #5 (permalink)
technobard
Centurion Nova Prime
 
technobard's Avatar
 
Join Date: May 2002
Location: Oak Park, IL (USA)
Posts: 284
technobard is on a distinguished road
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.
__________________
technobard is offline   Reply With Quote
Old 09-13-2002, 10:25 PM   #6 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,680
redhead is on a distinguished road
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.
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
port forwarding? sde Linux / BSD / OS X 5 03-05-2004 10:20 AM
getting windows logged in user info sde ASP, ASP.NET 3 07-13-2003 03:07 PM
serial port display Imon Fyre Linux / BSD / OS X 0 06-13-2003 11:02 AM
Requiring user authentication based on port number Epsilon Linux / BSD / OS X 2 05-16-2003 11:23 AM
running sshd on a didfferent port sde Linux / BSD / OS X 2 12-24-2002 01:50 PM


All times are GMT -8. The time now is 08:55 PM.


Powered by vBulletin Version 3.6.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2006, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting
Open Circle