1 |
Try this: |
2 |
|
3 |
# /etc/conf.d/nfs |
4 |
|
5 |
# If you wish to set the port numbers for lockd, |
6 |
# please see /etc/sysctl.conf |
7 |
|
8 |
# Optional services to include in default `/etc/init.d/nfs start` |
9 |
# For NFSv4 users, you'll want to add "rpc.idmapd" here. |
10 |
NFS_NEEDED_SERVICES="rpc.idmapd" |
11 |
|
12 |
# Number of servers to be started up by default |
13 |
OPTS_RPC_NFSD="8" |
14 |
|
15 |
# Options to pass to rpc.mountd |
16 |
# ex. OPTS_RPC_MOUNTD="-p 32767" |
17 |
OPTS_RPC_MOUNTD="-p 4000" |
18 |
|
19 |
# Options to pass to rpc.statd |
20 |
# ex. OPTS_RPC_STATD="-p 32765 -o 32766" |
21 |
OPTS_RPC_STATD="-p4001 -o4002" #-p 4000" |
22 |
|
23 |
# Options to pass to rpc.idmapd |
24 |
OPTS_RPC_IDMAPD="" |
25 |
|
26 |
# Options to pass to rpc.gssd |
27 |
OPTS_RPC_GSSD="" |
28 |
|
29 |
# Options to pass to rpc.svcgssd |
30 |
OPTS_RPC_SVCGSSD="" |
31 |
|
32 |
# Options to pass to rpc.rquotad (requires sys-fs/quota) |
33 |
OPTS_RPC_RQUOTAD="" |
34 |
|
35 |
# Timeout (in seconds) for exportfs |
36 |
EXPORTFS_TIMEOUT=30 |
37 |
|
38 |
|
39 |
in /etc/sysctl.conf: |
40 |
... |
41 |
# TCP Port for lock manager |
42 |
fs.nfs.nlm_tcpport = 4003 |
43 |
# UDP Port for lock manager |
44 |
fs.nfs.nlm_udpport = 4003 |
45 |
|
46 |
|
47 |
|
48 |
asterisk ~ # rpcinfo -p |
49 |
program vers proto port service |
50 |
100000 4 tcp 111 portmapper |
51 |
100000 3 tcp 111 portmapper |
52 |
100000 2 tcp 111 portmapper |
53 |
100000 4 udp 111 portmapper |
54 |
100000 3 udp 111 portmapper |
55 |
100000 2 udp 111 portmapper |
56 |
100024 1 udp 4001 status |
57 |
100024 1 tcp 4001 status |
58 |
100005 1 udp 4000 mountd |
59 |
100005 1 tcp 4000 mountd |
60 |
100005 2 udp 4000 mountd |
61 |
100005 2 tcp 4000 mountd |
62 |
100005 3 udp 4000 mountd |
63 |
100005 3 tcp 4000 mountd |
64 |
100003 2 tcp 2049 nfs |
65 |
100003 3 tcp 2049 nfs |
66 |
100003 2 udp 2049 nfs |
67 |
100003 3 udp 2049 nfs |
68 |
100021 1 udp 4003 nlockmgr |
69 |
100021 3 udp 4003 nlockmgr |
70 |
100021 4 udp 4003 nlockmgr |
71 |
100021 1 tcp 4003 nlockmgr |
72 |
100021 3 tcp 4003 nlockmgr |
73 |
100021 4 tcp 4003 nlockmgr |
74 |
asterisk ~ # |
75 |
|
76 |
|
77 |
BillK |
78 |
|
79 |
|
80 |
|
81 |
|
82 |
On 02/01/14 19:23, Tanstaafl wrote: |
83 |
> No one? |
84 |
> |
85 |
> Another reboot, and had to open up OUTGOING port 57212 this time. |
86 |
> |
87 |
> Why are the static ports I'm assigning not being used? |
88 |
> |
89 |
> On 2013-12-31 8:11 AM, Tanstaafl <tanstaafl@×××××××××××.org> wrote: |
90 |
>> On 2013-12-31 7:30 AM, Tanstaafl <tanstaafl@×××××××××××.org> wrote: |
91 |
>>> I've made the following changes to the following config files: |
92 |
>>> |
93 |
>>> /etc/conf.d/nfs |
94 |
>>> |
95 |
>>> OPTS_RPC_MOUNTD="-p 32767" |
96 |
>>> OPTS_RPC_STATD="-p 32765 -o 32766" |
97 |
>>> |
98 |
>>> I've also changed the lockd ports |
99 |
>>> |
100 |
>>> /etc/sysctl.conf |
101 |
>>> |
102 |
>>> # You should compile nfsd into the kernel or add it |
103 |
>>> # to modules.autoload for this to work properly |
104 |
>>> # TCP Port for lock manager |
105 |
>>> fs.nfs.nlm_tcpport = 4001 |
106 |
>>> # UDP Port for lock manager |
107 |
>>> fs.nfs.nlm_udpport = 4001 |
108 |
>>> |
109 |
>>> But when I try to mount the remote filesystem, I see the outbound |
110 |
>>> request being blocked by the firewall. |
111 |
>>> |
112 |
>>> If I open up the port in the firewall, it mounts immediately. |
113 |
>>> |
114 |
>>> But after a reboot, the next time I try mounting it, some other random |
115 |
>>> port shows up in the firewall logs... |
116 |
>>> |
117 |
>>> This can't be all that difficult... I must be missing something obvious. |
118 |
>> |
119 |
>> # rpcinfo -p |
120 |
>> program vers proto port service |
121 |
>> 100000 4 tcp 111 portmapper |
122 |
>> 100000 3 tcp 111 portmapper |
123 |
>> 100000 2 tcp 111 portmapper |
124 |
>> 100000 4 udp 111 portmapper |
125 |
>> 100000 3 udp 111 portmapper |
126 |
>> 100000 2 udp 111 portmapper |
127 |
>> 100024 1 udp 32765 status |
128 |
>> 100024 1 tcp 32765 status |
129 |
>> |
130 |
>> Again, this system is NOT running an NFS SERVER, I am only trying to use |
131 |
>> the nfs CLIENT to mount a remote NFS share - so, is the above what I |
132 |
>> should expect to see? something tells me no... |
133 |
>> |
134 |
>> Shouldn't the lockd ports be showing up to? |
135 |
>> |
136 |
> |
137 |
> |