Solved

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

Posted on 2011-09-09
5
477 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.

749 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