linuxxer |
08-01-2012 02:54 PM |
Yes, Thats my mistake.
I am using Debian 6.0.5. It uses kernel based NFS server
And My configuration:
Code:
## /etc/hosts.allow ##
sshd : 127.0.0.1 192.168.10.0/255.255.255.0
xinetd : 127.0.0.1 192.168.10.0/255.255.255.0
portmap : 127.0.0.1 192.168.10.0/255.255.255.0
mountd : 127.0.0.1 192.168.10.0/255.255.255.0
statd : 127.0.0.1 192.168.10.0/255.255.255.0
## /etc/hosts.deny ##
sshd : ALL
xinetd : ALL
portmap : ALL
mountd : ALL
statd : ALL
Code:
## /etc/xinetd.d/sunrpc ##
service sunrpc
{
id = sunrpc-tcp
disable = no
type = RPC
socket_type = stream
protocol = tcp
# port = 111
rpc_version = 2-4
# interface = 192.168.10.10
server = /sbin/portmap
wait = no
user = root
log_type = SYSLOG daemon crit
log_on_success = HOST USERID PID
log_on_failure = HOST USERID ATTEMPT
}
service sunrpc
{
id = sunrpc-udp
disable = no
type = RPC
socket_type = dgram
protocol = udp
# port = 111
rpc_version = 2-4
# interface = 192.168.10.10
server = /sbin/portmap
wait = no
user = root
log_type = SYSLOG daemon crit
log_on_success = HOST USERID PID
log_on_failure = HOST USERID ATTEMPT
}
When I start portmap with type = RPC service
rsyslog says:
Code:
Aug 1 20:29:30 debian xinetd[1039]: Reading included configuration file: /etc/xinetd.d/sunrpc [file=/etc/xinetd.d/sunrpc] [line=19]
.....
.....
Aug 1 20:29:30 debian xinetd[1039]: pmap_set failed. service=sunrpc program=100000 version=2
But When I start portmapper as normal TCP/UDP service, by commenting "type = RPC", then
rsyslog says:
Code:
Aug 1 20:57:07 debian xinetd[1039]: Reading included configuration file: /etc/xinetd.d/sunrpc [file=/etc/xinetd.d/sunrpc] [line=19]
.....
.....
Aug 1 20:57:07 debian xinetd[1039]: readjusting service sunrpc
Aug 1 20:57:07 debian xinetd[1039]: Reconfigured: new=0 old=2 dropped=0 (services)
At client side, when I run command
Code:
$ rpcinfo -p debian
At server side, rsyslog entry :
Code:
Aug 1 20:57:40 debian xinetd[1039]: START: sunrpc pid=1533 from=192.168.10.20
Aug 1 20:58:01 debian portmap[1534]: cannot bind tcp: Address already in use
After that I remove /etc/xinetd.d/sunrpc,
and I start portmap in normalway,
i.e. NOT as xinetd manage service.
And I try to configure other RPC services.
Code:
## /etc/xinetd.d/mountd ##
service mountd
{
id = mountd-tcp
type = RPC
socket_type = stream
protocol = tcp
port = 2050
rpc_version = 3
# interface = 192.168.10.10
server = /usr/sbin/rpc.mountd
server_args = --manage-gids --port 2050 --nfs-version 3
wait = no
user = root
log_type = SYSLOG daemon crit
log_on_success = HOST USERID PID
log_on_failure = HOST USERID ATTEMPT
}
service mountd
{
id = mountd-udp
type = RPC
socket_type = dgram
protocol = udp
port = 2050
rpc_version = 3
# interface = 192.168.10.10
server = /usr/sbin/rpc.mountd
server_args = --manage-gids --port 2050 --nfs-version 3
wait = no
user = root
log_type = SYSLOG daemon crit
log_on_success = HOST USERID PID
log_on_failure = HOST USERID ATTEMPT
}
## /etc/xinetd.d/nfsd ##
service nfs
{
id = nfs-tcp
type = RPC
socket_type = stream
protocol = tcp
port = 2049
rpc_version = 3
# interface = 192.168.10.10
server = /usr/sbin/rpc.nfsd
server_args = 1 --no-nfs-version=2,4
wait = no
user = root
log_type = SYSLOG daemon crit
log_on_success = HOST USERID PID
log_on_failure = HOST USERID ATTEMPT
}
service nfs
{
id = nfs-udp
type = RPC
socket_type = dgram
protocol = udp
port = 2049
rpc_version = 3
# interface = 192.168.10.10
server = /usr/sbin/rpc.nfsd
server_args = 1 --no-nfs-version=2,4
wait = no
user = root
log_type = SYSLOG daemon crit
log_on_success = HOST USERID PID
log_on_failure = HOST USERID ATTEMPT
}
rsyslog says:
Code:
Aug 1 23:32:20 debian xinetd[4384]: Reading included configuration file: /etc/xinetd.d/mountd [file=/etc/xinetd.d/mountd] [line=26]
Aug 1 23:32:20 debian xinetd[4384]: Reading included configuration file: /etc/xinetd.d/nfsd [file=/etc/xinetd.d/nfsd] [line=35]
......
......
Aug 1 23:27:56 debian xinetd[3822]: readjusting service mountd-tcp
Aug 1 23:27:56 debian xinetd[3822]: readjusting service mountd-udp
Aug 1 23:27:56 debian xinetd[3822]: readjusting service ssh
Aug 1 23:27:56 debian xinetd[3822]: pmap_set failed. service=nfs-tcp program=100003 version=3
Aug 1 23:27:57 debian xinetd[3822]: Service nfs-tcp failed to start and is deactivated.
Aug 1 23:27:57 debian xinetd[3822]: pmap_set failed. service=nfs-udp program=100003 version=3
Aug 1 23:27:58 debian xinetd[3822]: Service nfs-udp failed to start and is deactivated.
I also tried this with: rpc_version = 2-4
|