Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Security
User Name
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.


  Search this Thread
Old 11-22-2006, 07:13 AM   #1
Registered: Jan 2006
Posts: 172

Rep: Reputation: 15
opening a port

i have redhat linux 9 server with 2 nic

eth0 - local
eth1- internet

we have a application server in our local lan that ip is which works on 8500 port.i want to expose this machine on internet for users which are not in office. please give any suggestions regarding iptables.

thanks in advance
Old 11-22-2006, 07:49 AM   #2
Registered: Oct 2006
Location: Utah
Posts: 520

Rep: Reputation: 61
Try this:

iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 8500 -j DNAT --to-destination
Old 11-23-2006, 02:14 PM   #3
Registered: Sep 2005
Location: New delhi
Distribution: RHEL 3.0/4.0
Posts: 777

Rep: Reputation: 31
& to continue fordeck's post,

either set your lan client('s gateway as

run another POSTROUTING rule at firewall.
iptables -t nat -A POSTROUTING -p tcp --dport 8500 -d -j SNAT --to
And if in case you are already running any firewall script, you got to allow this traffic from FORWARD (--dport 8500) chain as well.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Opening port 137 cucolin@ Linux - Networking 7 08-06-2007 01:09 AM
Opening Port steve007 Linux - Newbie 5 07-23-2005 01:05 PM
opening a port Robin01 Linux - General 3 11-17-2004 10:40 PM
Opening a Port gpamkenny Linux - Networking 3 11-04-2004 02:51 PM
Opening port 80 nmoog Linux - Newbie 4 02-01-2004 04:00 PM > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 01:57 AM.

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