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 03-02-2004, 09:13 AM   #1 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,397
sde is on a distinguished road
port forwarding?

can anyone give me any tips on where to go to forward ports?

i have 2 ips i can use and i want to forward port 8443 of 1 ip to port 80 of another.

this system is rh9
__________________
testing 1 2 3
sde is offline   Reply With Quote
Old 03-02-2004, 10:27 AM   #2 (permalink)
Belisarius
Java fanboy
 
Belisarius's Avatar
 
Join Date: Aug 2003
Posts: 1,114
Belisarius is on a distinguished road
I haven't done it myself, but I think you need to mess around with iptables.
__________________
GitS
Belisarius is offline   Reply With Quote
Old 03-02-2004, 11:00 PM   #3 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,680
redhead is on a distinguished road
Re: port forwarding?

Quote:
Originally posted by sde
i have 2 ips i can use and i want to forward port 8443 of 1 ip to port 80 of another.
Code:
~ > iptables -t nat -A PREROUTING -d 1.2.3.4 \ -p tcp --dport 8443 -j DNAT --to 5.6.7.8:80
__________________
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 03-03-2004, 07:05 PM   #4 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,397
sde is on a distinguished road
it didn't like the '-p' .. and i'm really afraid to experiment with different things on this one .. heh
__________________
testing 1 2 3
sde is offline   Reply With Quote
Old 03-04-2004, 01:23 AM   #5 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,680
redhead is on a distinguished road
Try changing '-p' to '--proto' it should accept that.
http://www.iptables.org/documentatio...-HOWTO-10.html
__________________
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 03-05-2004, 10:20 AM   #6 (permalink)
sdeming
Code Monkey
 
Join Date: Jul 2002
Location: Michigan
Posts: 85
sdeming is on a distinguished road
On RH9 you can also use xinetd to listen on one IP/port and redirect to another IP/port. Might bet worth looking into if you can't get the iptables bit to work.

Also, if it's 8443 then it is likely https traffic so you'll want to forward to port 443.
__________________
Scott
B4 09 BA 09 01 CD 21 CD 20 53 63 6F 74 74 24
sdeming 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
PiNg FlOoDiNg bluedevils1414 Lounge 21 08-13-2003 08:21 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
re-routing info to another port? sde Linux / BSD / OS X 5 09-13-2002 10:25 PM


All times are GMT -8. The time now is 08:54 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