LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 02-13-2008, 06:25 AM   #1
mrlinux2000
Member
 
Registered: Feb 2008
Posts: 144

Rep: Reputation: 15
access to oracle port through iptables


how can i let external ip to access to an oracle port in a pc on my lan , i use iptables and NATing ihave public ip and privates for my lan

help me please
 
Old 02-13-2008, 07:20 AM   #2
mrlinux2000
Member
 
Registered: Feb 2008
Posts: 144

Original Poster
Rep: Reputation: 15
please any one can ?
this is urgent for me cause i want someone external to connect to oracle on my lan where i use two network card one for ext and other for internal and using NAT between them and want the one to access orcal port on PC 192.168.1.12 which is internal ,, how to do that ???
 
Old 02-13-2008, 01:17 PM   #3
mtimbro
Member
 
Registered: Feb 2008
Location: Montreal, Canada
Distribution: RedHat 3/4, Ubuntu 7.10
Posts: 86

Rep: Reputation: 15
Thumbs up Port forwarding

Hi,

The process, with iptables, is called port forwarding. Be very careful with this as the port becomes freely available from the internet to anyone who scans your network. Make sure your application / service on the inside is well patched and protected.

It should look something like this:

iptables -t nat -A PREROUTING -i <your incoming net interface (eth0?)> -p tcp -m tcp --dport <your oracle port> -j DNAT --to-destination 192.168.1.12:<your oracle port>
iptables -A INPUT -i eth1 -p tcp -m tcp --dport <your oracle port> -j ACCEPT

Cheers,

Last edited by mtimbro; 02-13-2008 at 01:18 PM.
 
Old 02-14-2008, 02:23 AM   #4
mrlinux2000
Member
 
Registered: Feb 2008
Posts: 144

Original Poster
Rep: Reputation: 15
this command will allow eevryone to get access on my lan but i want a specific address ip to have the access

or if you can give me a better solution will be appreciated :

i have eth0 : internet 172.x.x.x
eth1 : LAN 10.x.x.x

and i want one in the exterieur to get acces on telnet and oracle port at the address 10.10.5.3

Last edited by mrlinux2000; 02-14-2008 at 04:35 AM.
 
Old 02-15-2008, 07:13 AM   #5
mtimbro
Member
 
Registered: Feb 2008
Location: Montreal, Canada
Distribution: RedHat 3/4, Ubuntu 7.10
Posts: 86

Rep: Reputation: 15
Quote:
Originally Posted by mrlinux2000 View Post
this command will allow eevryone to get access on my lan but i want a specific address ip to have the access

or if you can give me a better solution will be appreciated :

i have eth0 : internet 172.x.x.x
eth1 : LAN 10.x.x.x

and i want one in the exterieur to get acces on telnet and oracle port at the address 10.10.5.3
I'm confused...The command I gave you gives access to anyone from the outside to your internal address on your oracle port and telnet assuming the machine you run these commands is the machine facing the internet:

iptables -t nat -A PREROUTING -i <your incoming net interface (eth0?)> -p tcp -m tcp --dport <your oracle port,23> -j DNAT --to-destination 10.10.5.3:<your oracle port,23>
iptables -A INPUT -i eth1 -p tcp -m tcp --dport <your oracle port,23> -j ACCEPT

No one on your LAN gets access through this process...
 
Old 02-15-2008, 10:24 AM   #6
mrlinux2000
Member
 
Registered: Feb 2008
Posts: 144

Original Poster
Rep: Reputation: 15
i want only one address that has the access not EVERYONE only one address for example i want the one who has address 215.256.12.136 can access on port http for my lan(192.168.1.1) through ethenet 1 (172.151.73.112)
 
Old 02-18-2008, 03:20 AM   #7
mrlinux2000
Member
 
Registered: Feb 2008
Posts: 144

Original Poster
Rep: Reputation: 15
i did this but it didnt work ????????????
please help me i've to do this connection
 
Old 02-18-2008, 07:08 AM   #8
gr8scot
Member
 
Registered: Jun 2007
Distribution: Debian, kubuntu
Posts: 73

Rep: Reputation: 16
packet forwarding enabled ?

Quote:
Originally Posted by mrlinux2000 View Post
i did this but it didnt work ????????????
please help me i've to do this connection
Also, check /var/log/syslog. If iptables is blocking anything it will show up there.
 
Old 02-18-2008, 07:14 AM   #9
mrlinux2000
Member
 
Registered: Feb 2008
Posts: 144

Original Poster
Rep: Reputation: 15
i did nt find that file , is there anything should install or active or something ??
thanky ou
 
Old 02-18-2008, 07:14 AM   #10
mtimbro
Member
 
Registered: Feb 2008
Location: Montreal, Canada
Distribution: RedHat 3/4, Ubuntu 7.10
Posts: 86

Rep: Reputation: 15
Quote:
Originally Posted by mrlinux2000 View Post
i did this but it didnt work ????????????
please help me i've to do this connection
iptables -t nat -A PREROUTING -i <your incoming net interface (eth0?)> -p tcp -m tcp --dport <your oracle port> -j DNAT --to-destination 192.168.1.12:<your oracle port>
iptables -A INPUT -s <ip adress you want to let in> -i eth0 -p tcp -m tcp --dport <your oracle port> -j ACCEPT

The part you want to add would be the '-s'.
 
Old 02-18-2008, 07:32 AM   #11
mrlinux2000
Member
 
Registered: Feb 2008
Posts: 144

Original Poster
Rep: Reputation: 15
thank you,
i'll give you details information (this is so so urgent for me am working)

i have two network cards one for external other for internal(192.168.1.208:6668/forms/frmservlet) which i want to access and telnet it from exteranl when i type http://myaddress.

http://myaddress this ROUT me to 192.168.1.208:6668/forms/frmservlet

and when telnet my address ROUTE me to 192.168.1.208

i hope it is clear

help will be so appreciated
thanks
 
Old 02-18-2008, 07:33 AM   #12
mrlinux2000
Member
 
Registered: Feb 2008
Posts: 144

Original Poster
Rep: Reputation: 15
iptables -t nat -A PREROUTING -i <your incoming net interface (eth0?)> -p tcp -m tcp --dport <your oracle port> -j DNAT --to-destination 192.168.1.12:<your oracle port>
this command i did it but it didnt work !!!
 
Old 02-19-2008, 04:34 AM   #13
mrlinux2000
Member
 
Registered: Feb 2008
Posts: 144

Original Poster
Rep: Reputation: 15
any one ???
 
Old 02-20-2008, 07:01 AM   #14
mtimbro
Member
 
Registered: Feb 2008
Location: Montreal, Canada
Distribution: RedHat 3/4, Ubuntu 7.10
Posts: 86

Rep: Reputation: 15
Quote:
Originally Posted by mrlinux2000 View Post
iptables -t nat -A PREROUTING -i <your incoming net interface (eth0?)> -p tcp -m tcp --dport <your oracle port> -j DNAT --to-destination 192.168.1.12:<your oracle port>
this command i did it but it didnt work !!!
Can you please post the outcome of the command when you run it in a shell ?
 
Old 02-20-2008, 07:11 AM   #15
mrlinux2000
Member
 
Registered: Feb 2008
Posts: 144

Original Poster
Rep: Reputation: 15
thank you all, the problem solved if anyone want to see how just post me a question, i dont have access now to the server , i'll put the commands later...
thank you all
 
  


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
How do I open a port for Oracle for remote access? koobi Linux - General 0 09-21-2007 04:06 AM
debian iptables squid - redirect port 80 to port 8080 on another machine nickleus Linux - Networking 1 08-17-2006 12:59 AM
Iptables - incomming port to external port - possible? ziggie216 Linux - Software 1 07-13-2006 02:08 PM
JBoss Web Port Conflict with Oracle EMS Port fortezza Programming 1 05-21-2006 07:02 PM
iptables port forwarding removes net access? Avatar Linux - Networking 2 05-21-2004 12:56 PM

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

All times are GMT -5. The time now is 02:29 PM.

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