LinuxQuestions.org
Help answer threads with 0 replies.
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 10-01-2003, 11:34 PM   #1
rvfrancisco
LQ Newbie
 
Registered: Oct 2003
Location: PHILIPPINES
Posts: 1

Rep: Reputation: 0
Port Forwarding


Good Day!

Does anyone knows how to configure port forwarding using iptables in Redhat7.3. My server is using two Lan Card with eth0 with local ip address 192.168.0.3 and eth1 with public ip address. I want to forward port 25 to my mail server 192.168.0.2. Hope anyone here can give me a sample config. THANKS

Regard,
Rodel Francisco
System Administrator
 
Old 10-02-2003, 03:12 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Hello,
I've just moved your thread to Linux - Networking. I think it fits better here. member Intro is a good place to say 'hello', but questions should be posted to other forums.

The rule you're searching for is:
Code:
iptables -A PREROUTING -t nat -p tcp -d $EXTIP --dport 25 -j DNAT --to 192.168.0.2:25
where EXTIP is your global IP.
 
Old 10-25-2003, 11:28 AM   #3
sal_paradise42
Member
 
Registered: Jul 2003
Location: Utah
Distribution: Gentoo FreeBSD 5.4
Posts: 150

Rep: Reputation: 16
i have a post somewhere else trying to do the same thing. when
you say global ip that is the public address the one my isp gives me? and if so in what format do I put in there? $193.82.161.30 or with out the $.
thanks
 
Old 10-25-2003, 01:11 PM   #4
silatts
LQ Newbie
 
Registered: Oct 2003
Posts: 19

Rep: Reputation: 0
w/o the $

the first search on google http://www.netfilter.org/documentati...-tutorial.html

Sil
 
  


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 and packet forwarding syrtsardo Linux - Newbie 2 07-03-2003 10:37 AM
How to do ip port forwarding cmardhekar Linux - General 0 08-28-2001 12:49 AM

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

All times are GMT -5. The time now is 02:09 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