LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-01-2001, 11:05 AM   #1
Tjousk
LQ Newbie
 
Registered: Jun 2001
Posts: 3

Rep: Reputation: 0

I have a machine on my internal network running a server on a port, I want to be able to connect to that port remotely through my gateway box (Running RedHat 6)
The internal machine can get out to the net without any troubles (IP Masquerading is set up on the gateway machine)

What I have been told so far:
you might just want to firewall mark it and use ipfwadm to forward the marked packet

using these commands to mark the packets:
EXTERNALIP="`ifconfig ppp0 | grep inet | cut -b 21-34`"
ipchains -A input -p tcp -s 0/0 -d $EXTERNALIP -m 5901

How do I forward the marked packets?
or is there a better way to do this?
 
Old 06-03-2001, 10:20 PM   #2
Linux
LQ Newbie
 
Registered: Jun 2001
Posts: 1

Rep: Reputation: 0
You will need ipmasqadm tool and this is what you would do to enable port forwarding:

ipmasqadm -portfw -a -P tcp -L your.external.ip port -R your.internal.ip port

In kernel 2.4.x, iptables takes care of this.

Hope it helps
 
Old 06-04-2001, 01:57 AM   #3
Tjousk
LQ Newbie
 
Registered: Jun 2001
Posts: 3

Original Poster
Rep: Reputation: 0
Yep :)

That's exactly what I needed. Thanks.

And it works with kernel 2.2.12-20
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
IPCHAINS port forwarding and IPTABLES port forwarding ediestajr Linux - Networking 26 01-14-2007 07:35 PM
Simple Port Forwarding Firewall - not forwarding MadTurki Linux - Security 14 04-09-2006 12:08 PM
Port 80 forwarding to port 22 with iptables zahoo Linux - Networking 3 02-22-2005 07:22 AM
Port Forwarding on RedHat 9 with single NIC brianv Linux - Networking 5 05-31-2004 06:36 PM
port forwarding and packet forwarding syrtsardo Linux - Newbie 2 07-03-2003 10:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration