[A few month's later due to being distracted by a pile of projects...] Answering Jonathan's question below, no, the current firewall_context/ipf_method for NFS doesn't work for me. Starting and stopping the related services has no impact on the rules I see loaded into IPF. Tracing the code, I think that the reason it doesn't work happens inside generate_rules() on the line that reads: [ "$mypolicy" = "use_global" ] && return 0 As on my system, "use_global" is returned by`svcprop -p firewall_config/policy svc:/network/nfs/server:default`. Below is my /etc/ipf/ipf.conf. My goal is to have the `mountd` ports dynamically added to the rules for the logical interface "nge1.vlan2"... =====START===== pass out all keep state block in all block return-rst in log first proto tcp all block return-icmp(host-unr) in log proto udp all # Loopback - allow everything pass in quick on lo0 all pass out quick on lo0 all # nge0 - allow everything pass in quick on nge0 all pass out quick on nge0 all # nge1 - allow nothing (traffic only on sub-interfaces) #pass in quick on nge1 all #pass out quick on nge1 all # nge1.vlan2 - allow NFS (how to add `mountd` ports here?) pass in quick on nge1.vlan2 proto udp from any to any port = 111 keep state pass in quick on nge1.vlan2 proto tcp from any to any port = 111 keep state pass in quick on nge1.vlan2 proto udp from any to any port = 2049 keep state pass in quick on nge1.vlan2 proto tcp from any to any port = 2049 keep state pass in quick on nge1.vlan2 proto udp from any to any port = 4045 keep state pass in quick on nge1.vlan2 proto tcp from any to any port = 4045 keep state =====STOP===== Corresponding to these interfaces: # ifconfig -a lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 nge0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2 inet 10.0.1.24 netmask ffffff00 broadcast 10.0.1.255 ether 0:25:90:2c:60:4a nge1: flags=1000943<UP,BROADCAST,RUNNING,PROMISC,MULTICAST,IPv4> mtu 1500 index 3 inet 0.0.0.0 netmask ffffffff ether 0:25:90:2c:60:4b nge1.vlan2: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 index 5 inet 10.0.2.24 netmask ffffff00 broadcast 10.0.2.255 ether 0:25:90:2c:60:4b lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1 inet6 ::1/128 Am I not suppose to by using a global policy? Thanks, Kent On 10/17/13 4:32 AM, Jonathan Adams wrote:
|
- [discuss] dynamic mountd ports and IPF Kent Watsen
- Re: [discuss] dynamic mountd ports and IPF Jonathan Adams
- Re: [discuss] dynamic mountd ports and IPF Kent Watsen
