Solved

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

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
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 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.

743 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

11 Experts available now in Live!

Get 1:1 Help Now