-
sommerfeld
I'd look for errors in the service's log - cat $(svcs -L /network/ipfilter)
-
szilard
Hi. It seems my ipf is acting up, so I have removed all configs (from GZ and from /zones/etc).
-
szilard
Now /etc/ipf/ipf.conf in GZ contains the following 2 lines:
-
szilard
pass in quick on lo0 all
-
szilard
pass out quick on lo0 all
-
szilard
I have also disabled ipf using: "svcadm disable network/ipfilter"
-
szilard
now svcs doesn't list ipfilter anymore and I have even rebooted the box to make sure it starts with a clean state.
-
szilard
so this is the current state:
pastebin.com/raw/M2F9vtCH
-
szilard
enabling ipf doesn't populates the filter list, but manual reload populates it:
pastebin.com/raw/ucrMmv4g
-
szilard
now, I assume ipf should read /etc/ipf/ipf.conf automatically, so let me reboot the box to see what happens.
-
szilard
It still doesn't loads the rules from ipf.conf automatically after a reboot:
pastebin.com/raw/et9kCTLP
-
szilard
What am I doing wrong here?
-
m1ari
maybe check it's setup to use the correct files as per the documentation on
omnios.org/info/ipfilter.html
-
m1ari
`svccfg -s ipfilter:default listprop | grep file`
-
m1ari
but if things are in default state then it sounds like what you have should work
-
m1ari
but also try sommerfeld's earlier suggestion:
-
m1ari
01:20 < sommerfeld> I'd look for errors in the service's log - cat $(svcs -L /network/ipfilter)
-
szilard
The files are the default, and looks ok to me. The log output doesn't tells me too much:
pastebin.com/raw/4zTQnwrW
-
szilard
Maybe: "Set 0 now inactive" ?
-
szilard
I try to reboot again, in this time I won't be available via irc.
-
szilard
I don't get this. Everything seems to be enabled according to the guides, i have rules in the ipf.conf, still the firewall rules doesn't gets loaded after booting the system:
pastebin.com/raw/96QUxWhd
-
tsoome
sometimes, it ma y happen, the guides are bad. from that log, see into /lib/svc/method/ipfilter - from it you will find the function to upgrade config and hint that you should have firewall_config_default/policy astring custom if you want to use those config files.... :P see also output from "svccfg -s ipfilter:default listprop"
-
szilard
-
szilard
Am I supposed to change firewall_config_default/policy to "custom"?
-
szilard
lemme try...
-
szilard
reboot.
-
szilard
Yess, it works now!
-
szilard
Thanks a lot!
-
szilard
-
szilard
I'd like to store the GZ and NGZ ipf configs in the same folder to make maintenance easier. IS it possible to symlink the NGZ ipf configs to the related zone/etc folders?
-
danmcd
You can use lofs in the zone configs.
-
danmcd
I do it on the directory level, but you can do it on the file level as well.
-
danmcd
add fs
-
danmcd
set dir="/etc/ipf"
-
danmcd
set special="/some/gz/path/for-this-zone/ipf"
-
danmcd
set type="lofs"
-
danmcd
end
-
danmcd
"dir" is in your zone. /some/gz/path/... is your gz (where you can manage it?)
-
danmcd
I'm assuming these are native zones.
-
danmcd
And also you can edit NGZ (assuming native) files from the gz by:
-
danmcd
/zones/<zonename>/root/etc/ipf
-
danmcd
(0)# zonename
-
danmcd
global
-
danmcd
(0)# ls /zones/router/root/etc/ipf
-
danmcd
ipf.conf ipnat.conf
-
danmcd
(0)#
-
danmcd
I'm assuming native zones here (I use lipkg exclusively on my OmniOS-running HDC).
-
szilard
I have mixed brands here. mostly sparse, but also some lx and pkgsrc zones, and 1 bhyve aswell.
-
szilard
Can I use ipf in lx zones?
-
andyf
Not in them, but you can configure rulesets for them from the GZ.
-
szilard
andyf: in /etc/ipf/ipf.conf?
-
szilard
maybe it supports some kind of include directive, so i can have separate files for the separate zones...
-
andyf
No, in <zone path>/etc/ipf.conf
-
andyf
For something like an lipkg zone there are two rulesets. One configured and visible from inside the zone and one that's GZ controlled and can't be seen from inside the zone. You can use both at once.
-
andyf
What Dan posted is how you'd configure the firewall inside the zone (which you can't do for lx). The disadvantage of that is that you have to trust the zone.
-
szilard
andyf: I have some rules in the <zone path>/etc/ipf.conf, but the "ipfstat -z plex -ioh" command returns "empty list for ipfilter in/out"
-
andyf
Try `ipfstat -G plex -ioh`
-
andyf
-z will show you the in-zone stuff, -G will show you the GZ-managed zone stuff.
-
szilard
Ach so!
-
szilard
Thanks a lot, I got reasonable output with the -G switch.
-
andyf
The -G stuff cannot be seen or modified from inside the zone.
-
szilard
andyf: I think thats OK in my case. AFAIK this is relevant only if one plans to delegate the in-zone administrator role, right?
-
szilard
I have already set up a complete firewall ruleset in <zone path>/etc/ipf.conf, no need for additional rules.
-
andyf
Basically, yes. But both can be used together too, so you can have one set of rules managed by the GZ and another set by the zone admin. The second doesn't work in lx zones though.
-
szilard
andyf: thanks for the explanation!
-
szilard
Plex clent still works, ipfstat shows the packages going nicely.
-
szilard
However the connections to the nGZ doesn't shows up in the 'ipfstat -t' output running in the GZ. Maybe i should define the zone here aswell with -z plex.
-
szilard
Aha! It is 'ipfstat -t -G plex'
-
szilard
Really nice.
-
andyf
In terms of symlinking (just catching up), that should work one way or the other. I'm not sure if the brand will honour symlinks in <zonepath>/etc (I'd just test it) but if it doesn't you could symlink the other way so the real files stays in the zone path.