Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 12-24-2009, 02:12 AM   #1
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 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 02:14 AM.
Old 12-24-2009, 02:46 AM   #2
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, 02:53 AM   #3
Registered: May 2006
Location: Italy
Distribution: Ubuntu, ArchLinux, Debian, SL, OpenBSD
Posts: 274

Rep: Reputation: 42
# Allow access on the server RHEL Machine from certain machines on the local network.
-A INPUT -s -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, 03:18 AM   #4
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?


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 08:57 AM
Restricting access to a specific port by MAC address caps_phisto Linux - Networking 3 10-23-2006 02:55 PM
Restricting access to a port based upon uid? Termina Linux - Security 2 08-20-2006 11:32 AM
Restricting Port Forwarding over OpenSSHd wwnexc Linux - Software 1 01-24-2006 11:15 AM
Restricting access Menestrel Linux - Newbie 1 06-07-2005 09:17 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:46 PM.

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