Solved

how do I allow specific ip addresses for xx port using iptables?

Posted on 2011-09-09
5
473 Views
Last Modified: 2012-05-12
Good day experts

I currently have a Websphere Application Server running on Linux SLES 10 SP2, I access the administrative console through port 9060. Although I have enabled security to access the admin console, I would also like to filter access by allowing only certain ip addresses through that port.

Would someone guide me how to accomplish this through iptables? I've already read some docs about iptables and how rules/chains/targets work but I'm still new with this command

Thanks in advance
0
Comment
Question by:Arrismog
  • 3
  • 2
5 Comments
 
LVL 7

Expert Comment

by:jackiechen858
ID: 36512790
edit /etc/sysconfig/SuSEfirewall2

find FW_SERVICES_ACCEPT_EXT, and add something like:
FW_SERVICES_ACCEPT_EXT="aa.bb.cc.dd/24,tcp,9060 "

the restart firewall:
/etc/init.d/SuSEfirewall2_setup restart
0
 
LVL 7

Expert Comment

by:jackiechen858
ID: 36512803
or just reload the rule:

/etc/init.d/SuSEfirewall2_setup reload
0
 

Author Comment

by:Arrismog
ID: 36514064
@jackiechen858:

Thanks! is there any way to do it by iptables command?

0
 
LVL 7

Accepted Solution

by:
jackiechen858 earned 500 total points
ID: 36516368

On Redhat/Centos, the iptables configuration file is  /etc/sysconfig/iptables.

On Suse Linux, it's /etc/sysconfig/SuSEfirewall2. My understanding is susefirewall is a wrapped iptabes ( it will generate iptables rules for you, and it's easier to configure).

you can still run iptables command from console/terminal, but the setting will be gone after you restart machine/Susefirewall.  If you want to use iptables format configuration like /etc/sysconfig/iptables, you have to disable SuSEfirewall2 and setup iptable initial script by yourself.




0
 

Author Closing Comment

by:Arrismog
ID: 36523956
It worked, thanks a lot!
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

​Being a Managed Services Provider (MSP) has presented you  with challenges in the past— and by meeting those challenges you’ve reaped the rewards of success.  In 2014, challenges and rewards remain; but as the Internet and business environment evol…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question