How to open firewall ports without yast

Hello everyone, I was wondering if anyone knows how to open firewall ports without using yast. The reason I’m asking is because I’m working on a .sh script for the installation of a couple of programs. Some ports need to be open for the programs to work, I find it really annoying to go to yast and type the ports manually every time.

I’ve looked at /etc/sysconfig/SuSEfirewall2

but can’t seem to find anything, I also know that after the changes I will have to stop start the firewall by running:

SuSEfirewall2 stop

SuSEfirewall2 start

any ideas?

I found the following example which seems to indicate you could do what you need, but you would need to restart the firewall after the change.

In a console as su type SuSEfirewall2 help

Example:

SuSEfirewall2 open <ZONE> <TYPE> <services…>
where ZONE is one of DMZ EXT INT
and TYPE is one of RPC IP UDP TCP

You will have to restart the firewall when you done
Thank You,

Hey Thanks JDMCDaniel3 It worked like a charm…

On 2011-01-23 23:06, hgallo wrote:

> I’ve looked at /etc/sysconfig/SuSEfirewall2
>
> but can’t seem to find anything,

It is all in there. That’s the file you have to edit.

Hint: use sed.

I also know that after the changes I
> will have to stop start the firewall by running:

SuSEfirewall2 restart


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

Hey Thanks JDMCDaniel3 It worked like a charm…
Happy to be of service hgallo. You have a super good day and thanks for letting us know of your success.

Thank You,