LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 07-07-2020, 03:14 AM   #1
qrange
Senior Member
 
Registered: Jul 2006
Location: Belgrade, Yugoslavia
Distribution: Debian stable/testing, amd64
Posts: 1,061

Rep: Reputation: 47
solaris ipf


I need to enable firewall on Solaris. If I put only this in /etc/ipf/ipf.conf:

Code:
#
# ipf.conf
#
# IP Filter rules to be loaded during startup
#
# See ipf(4) manpage for more information on
# IP Filter rules syntax.

block in log quick from 1.2.3.0/24 to any

will it only block given subnet and nothing else?
(is the default action allow?)
thanks.
 
Old 07-07-2020, 06:52 AM   #2
qrange
Senior Member
 
Registered: Jul 2006
Location: Belgrade, Yugoslavia
Distribution: Debian stable/testing, amd64
Posts: 1,061

Original Poster
Rep: Reputation: 47
solved, I've tried it on some less important server, and it works (doesn't block anything else).
 
Old 07-07-2020, 07:00 AM   #3
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,308
Blog Entries: 3

Rep: Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721
Hadn't Solaris changed to PF instead of IPF? If PF is available for the version you have that might be preferable for several reasons including more people are familiar with it.
 
Old 07-09-2020, 07:52 AM   #4
qrange
Senior Member
 
Registered: Jul 2006
Location: Belgrade, Yugoslavia
Distribution: Debian stable/testing, amd64
Posts: 1,061

Original Poster
Rep: Reputation: 47
dunno, what firewall is used by Solaris 11.3 SPARC ?


/etc/firewall/pf.conf seems to be missing

Last edited by qrange; 07-09-2020 at 07:55 AM.
 
Old 07-09-2020, 09:14 AM   #5
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,308
Blog Entries: 3

Rep: Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721
If I read correctly PF was introduced in 11.3, but it would be an older version of PF. Are there manual pages present for each of the device driver pf(4), the pf.conf(5) configuration, and the pfctl(8) utility?
 
Old 07-12-2020, 08:39 AM   #6
JomaSoftMarcel
LQ Newbie
 
Registered: Jul 2020
Location: Switzerland
Distribution: Solaris
Posts: 1

Rep: Reputation: Disabled
Solaris 11.3 includes PF (pkg install firewall) and IPF
Solaris 11.4 includes PF
 
Old 08-13-2021, 07:27 PM   #7
Trihexagonal
Member
 
Registered: Jul 2017
Posts: 362
Blog Entries: 1

Rep: Reputation: 334Reputation: 334Reputation: 334Reputation: 334
Quote:
Originally Posted by qrange View Post
I need to enable firewall on Solaris. If I put only this in /etc/ipf/ipf.conf:

(is the default action allow?)
It is a rule-based firewall. There is no "default" action other than the rules you make for it.

pf was available when I used Solaris but it was not the standard yet. I've been using it on FreeBSD since 2005 and have posted my ruleset in that forum and the BSD forum next door.

I love you all equally as much:

Code:
### Macro name for external interface
ext_if = "em0"
netbios_tcp = "{ 22, 23, 25, 80, 110, 111, 123, 512, 513, 514, 515, 6000, 6010 }"
netbios_udp = "{ 123, 512, 513, 514, 515, 5353, 6000, 6010 }"

### Reassemble fragmented packets
scrub in on $ext_if all fragment reassemble

### Default deny everything
block log all

### Pass loopback
set skip on lo0

### Block spooks
antispoof for lo0
antispoof for $ext_if inet
block in from no-route to any
block in from urpf-failed to any
block in quick on $ext_if from any to 255.255.255.255
block in quick log on $ext_if from { 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 255.255.255.255/32 } to any

### Block all IPv6
block in quick inet6 all
block out quick inet6 all

### Block to and from port 0
block quick proto { tcp, udp } from any port = 0 to any
block quick proto { tcp, udp } from any to any port = 0

### Block specific ports
block in quick log on $ext_if proto tcp from any to any port $netbios_tcp
block in quick log on $ext_if proto udp from any to any port $netbios_udp

### Keep and modulate state of outbound tcp, udp and icmp traffic
pass out on $ext_if proto { tcp, udp, icmp } from any to any modulate state
 
Old 06-01-2023, 03:44 PM   #8
naancy43
LQ Newbie
 
Registered: Apr 2023
Location: united state
Posts: 2

Rep: Reputation: 0
solaris ipf

Solaris IPF (Internet Protocol Filter) is a firewall technology used in the Solaris operating system. It provides network-level filtering and packet processing capabilities, allowing administrators to define rules and policies for network traffic control and security. With Solaris IPF, administrators can implement fine-grained control over incoming and outgoing network connections based on various criteria such as source/destination IP addresses, port numbers, protocols, and more. IPF offers flexibility and robustness in securing network communications and mitigating potential security risks. It is a powerful tool for managing network traffic and enforcing security measures on Solaris-based systems, helping to protect against unauthorized access and potential threats.
 
Old 06-01-2023, 05:42 PM   #9
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by naancy43 View Post
Solaris IPF (Internet Protocol Filter) is a firewall technology used in the Solaris operating system. It provides network-level filtering and packet processing capabilities, allowing administrators to define rules and policies for network traffic control and security. With Solaris IPF, administrators can implement fine-grained control over incoming and outgoing network connections based on various criteria such as source/destination IP addresses, port numbers, protocols, and more. IPF offers flexibility and robustness in securing network communications and mitigating potential security risks. It is a powerful tool for managing network traffic and enforcing security measures on Solaris-based systems, helping to protect against unauthorized access and potential threats <SPAM LINK REMOVED>
Thanks for copy/pasting a description to a two-year-old closed thread. Reported.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
IPF on Solaris 10 prior 10 8/07 releases h@foorsa.biz Solaris / OpenSolaris 2 05-26-2010 03:15 PM
ipf/ipnat emule freebsd = the 1st flying computer sk8o *BSD 3 04-13-2008 06:20 PM
Solaris 10 IPFilter /etc/ipf/pfil.ap configuration option. Zepiroth Solaris / OpenSolaris 2 03-01-2007 08:54 PM
snort with ipf and guardian SiLiCoN *BSD 0 05-11-2005 06:43 AM
solaris 9 with CDE and IPF aetengoku Solaris / OpenSolaris 4 01-15-2004 10:07 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 07:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration