Solved

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

Posted on 2011-09-09
5
460 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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

932 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now