LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1003|回复: 1

[Bug 171639] New: ypserv specific port binding fail with -p option

[复制链接]
发表于 2005-10-25 05:32:34 | 显示全部楼层 |阅读模式
Hi, I have logged a bug in http://bugzilla.redhat.com:
[Bug 171639] New: ypserv specific port binding fail with -p option

Can you guys reproduce this bug?

Details:

I want to assign ypserv a specifc port when started and thus make it easier
to use NIS in a firewalled environment. By assigning specific port, I can open
this port permenently on my firewall. Otherwise, I have to add the port every
time on my firewall's trusted ports after ypserv is restarted.

I am using RHEL 4.0 with ypserv 2.13.5. The man page of ypserv says:

-p --port port
              ypserv  will  bind itself to this port.  This makes it possible
              to have a router filter packets  to  the  NIS  ports,  so  that
              access  to  the  NIS  server  from hosts on the Internet can be
              restricted.

I tried the "-p port" option, but it failed to assign ypserv a specific port.

1. start ypserv with -p option at startup to specify the port:
/etc/init.d/ypserv start -p 1000

or
1. edit /etc/init.d/ypserv file and add "-p 1000" in the "start" section.

2. run "rpcinfo -p localhost" to check, it seems ypserv always receives a random port from portmap.

Can anyone try this on your machine? I want to make sure it doesn't only happen to me
 楼主| 发表于 2005-10-28 07:32:21 | 显示全部楼层
Good news...I have heard from the redhat.com:

**************************************************************
The problem you're having is that ypserv is not being run with the '-p 1000' option.

Running '/etc/init.d/ypserv start -p 1000' will not run 'ypserv -p 1000' it will
only run the ypserv init script (with the options specified there).

The best thing to do is add the following line to /etc/sysconfig/network
YPSERV_ARGS="-p 1000"

Then run 'service ypserv stop', then 'service ypserv start'.

**************************************************************

I tested as suggested and it works!  ypserv is running with the port specified

Cheers....
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表