LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-24-2009, 01:12 AM   #1
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,466
Blog Entries: 6

Rep: Reputation: 51
Restricting IPs to access DB Port 1521?


I have RHEL Machine which has 1521 port active. All I want to restrict the certains IPs like 10.14.236.140/141/142/143 to access this DB Port.Anyone who can sugest me for that? If I need to write a script, can anyone help me with the same.
Also, it would be good to restrict those machine with hostname (if possible)

Last edited by your_shadow03; 12-24-2009 at 01:14 AM.
 
Old 12-24-2009, 01:46 AM   #2
baltho
Member
 
Registered: Aug 2004
Location: Adelaide, South Australia
Distribution: Ubuntu (Natty)
Posts: 38

Rep: Reputation: 18
You could write some iptables rules to do this: personally I prefer to install Firestarter, which is a nice, simple gui front-end to iptables firewalls and makes life soooo much simpler. (As long as you're not configuring a router with 3 NICs, or something complicated, which it seems you're not).
Hostname/IP restrictions are all there, and it's got a good log for firewall violations as well, which I like.
Hope this helps, from a fellow oracle dba!!
 
Old 12-24-2009, 01:53 AM   #3
AleLinuxBSD
Member
 
Registered: May 2006
Location: Italy
Distribution: Ubuntu, ArchLinux, Debian, SL, OpenBSD
Posts: 274

Rep: Reputation: 42
Firewall.
# Allow access on the server RHEL Machine from certain machines on the local network.
-A INPUT -s 10.14.236.140/143 -p tcp -m tcp --dport 1521 -m state --state NEW -j ACCEPT

The idea about using hostname isn't really good because the hostname could be changed.
 
Old 12-24-2009, 02:18 AM   #4
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,466

Original Poster
Blog Entries: 6

Rep: Reputation: 51
Thanks AleLinuxBSD,

Will this rule only allow those IPs ( Is 140/143 correct way for range IPs?)
What if I want to provide hostname restrictly?
 
  


Reply


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
can not connect to port 1521 mrlinux2000 Solaris / OpenSolaris 2 12-15-2009 07:57 AM
Restricting access to a specific port by MAC address caps_phisto Linux - Networking 3 10-23-2006 01:55 PM
Restricting access to a port based upon uid? Termina Linux - Security 2 08-20-2006 10:32 AM
Restricting Port Forwarding over OpenSSHd wwnexc Linux - Software 1 01-24-2006 10:15 AM
Restricting access Menestrel Linux - Newbie 1 06-07-2005 08:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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