Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 265
  • Last Modified:

Linux Routing

Hello,

I would like to do the following with my Linux Fedora Core 2 server.
I have two NIC's one with a static IP on the Internet and an other that's connected to a hub with the local LAN.

I would like to redirect all the traffic that's indended for the fixed IP on two ports 9998 and 9999 to be send to an IP in the local LAN.

Is this possible?  If Yes how do I do it does anybody have a good tutorial or some software i have to install.  I'm gonna warn you I'm a new with Linux.

thx
Greg
0
gregorydeceuninck
Asked:
gregorydeceuninck
1 Solution
 
rindiCommented:
Yes, this is possible. I use shorewall to do this (http://shorewall.sourceforge.net/). Actually all the necessary info is on that site or in the example files of the product. Look for the expression "Port forwarding". This would be inside the "rules" file and would look something like this:

Action         source   dest                                           protocol    dest-port
DNAT          net         loc:192.168.0.5:9999           tcp              9999

You can do the same with iptables, and shorewall more or less configures iptables, but it is simpler to use shorewall to configure your firewall.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now