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
Old 06-22-2003, 06:55 PM   #1 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,489
sde is on a distinguished road
re-routing ports?

i need to figure out a way to re-route a port to another port.

there is a service that only runs on port: 8767

i can not change the port which the service runs on .. but i want outsiders to be able to access that service on port: 27009

i'm need to do this out of necessity and for reasons beyond my control .. so please don't ask why =)

is there a way i can do this?

thanks in advance,
sde
__________________
Mike
sde is offline   Reply With Quote
Old 06-22-2003, 08:42 PM   #2 (permalink)
EscapeCharacter
GNU/Punk
 
EscapeCharacter's Avatar
 
Join Date: Jul 2002
Location: stuffs
Posts: 66
EscapeCharacter is on a distinguished road
Send a message via AIM to EscapeCharacter
this will do what you want(assuming you are using iptables)

Code:
/sbin/iptables -t nat -A PREROUTING -i ppp0 -p tcp --dport 27009 -j DNAT --to 127.0.0.1:8767
edit:
change the ppp0 to whatever interface you are using ofcourse
__________________
cd /usr/ports/misc/life && make install
EscapeCharacter is offline   Reply With Quote
Old 06-23-2003, 12:48 PM   #3 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,489
sde is on a distinguished road
thanks a lot! i'm gonna give it a try tonight.

this is probably good material for a quick tutorial
__________________
Mike
sde is offline   Reply With Quote
Old 06-23-2003, 05:54 PM   #4 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,489
sde is on a distinguished road
hmm .. how do i undo that? lol

it doesn't seem to work. i'm trying to get teamspeak ( www.teamspeak.org ) to run on our game server which only has ports 27010 to 27020 open. ( don't ask why lol )

the teamspeak documentation notes this:

Q: What ports does the server use?

A: The TeamSpeak Server uses the following ports:
8767 UDP, for the server itself.
Adjustable in the server.ini: ServerUDPPort=8767
14534 TCP, WebInterface
Adjustablein the server.ini: HTTPServer Port=14534
51234 TCP, TCPQuery port
Adjustable in the server.ini: TCPQueryPort=51234

To get server to work behind firewall, nat, masq you need only to open/forward the server port (in the above case: 8767 UDP).

i'm completely at a loss and have no clue if this can really work or not.
__________________
Mike
sde is offline   Reply With Quote
Old 06-24-2003, 01:24 AM   #5 (permalink)
EscapeCharacter
GNU/Punk
 
EscapeCharacter's Avatar
 
Join Date: Jul 2002
Location: stuffs
Posts: 66
EscapeCharacter is on a distinguished road
Send a message via AIM to EscapeCharacter
Quote:
Originally posted by sde
hmm .. how do i undo that? lol

it doesn't seem to work. i'm trying to get teamspeak ( www.teamspeak.org ) to run on our game server which only has ports 27010 to 27020 open. ( don't ask why lol )

the teamspeak documentation notes this:

Q: What ports does the server use?

A: The TeamSpeak Server uses the following ports:
8767 UDP, for the server itself.
Adjustable in the server.ini: ServerUDPPort=8767
14534 TCP, WebInterface
Adjustablein the server.ini: HTTPServer Port=14534
51234 TCP, TCPQuery port
Adjustable in the server.ini: TCPQueryPort=51234

To get server to work behind firewall, nat, masq you need only to open/forward the server port (in the above case: 8767 UDP).

i'm completely at a loss and have no clue if this can really work or not.
didnt know it ran on a udp port. change the -p part from tcp to udp
__________________
cd /usr/ports/misc/life && make install
EscapeCharacter is offline   Reply With Quote
Reply

Bookmarks

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

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



All times are GMT -8. The time now is 10:19 AM.


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





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting