LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


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

Rep: Reputation: 15
opening a port


i have redhat linux 9 server with 2 nic

eth0 - 192.168.1.2 local
eth1- 59.144.124.57 internet

we have a application server in our local lan that ip is
192.168.1.249 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
fordeck
Member
 
Registered: Oct 2006
Location: Utah
Posts: 520

Rep: Reputation: 61
Try this:

Code:
iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 8500 -j DNAT --to-destination 192.168.1.249:8500
 
Old 11-23-2006, 02:14 PM   #3
amitsharma_26
Member
 
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(192.168.1.249)'s gateway as 192.168.1.2
OR

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


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
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

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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