LinuxSir.cn,穿越时空的Linuxsir!

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

proftpd如何绑定ip地址

[复制链接]
发表于 2003-6-21 12:16:05 | 显示全部楼层 |阅读模式
请问双网卡的服务器安装proftpd,如何只绑定一个地址,我的服务器老是提示我
unable to determine IP address of 'lfs'


我的系统是LFS,eth0:192.168.0.1 eth1:192.168.1.2
发表于 2003-6-21 13:39:26 | 显示全部楼层
它可不可以先apache一样可以用listen eth0 OR eth1这样呢。
如果可以我想就可以了。因为它只监听那一个IP地址的请求(我也没有测试过,如有错误请指正)
 楼主| 发表于 2003-6-21 22:33:24 | 显示全部楼层
好像不行!! apache是怎么做的?
发表于 2003-6-26 10:07:19 | 显示全部楼层
unable to determine IP address of 'lfs'<--在/etc/hosts和/etc/hostname里面加入你自己主机的名字IP对应项就ok.
如果你想在两个ip地址上都提供ftp服务,可以用bind选项设置.
发表于 2003-6-26 10:13:14 | 显示全部楼层

例子

# 设置两ip两port的ftp服务
ServerName                      "Debian"
ServerType                      standalone
ShowSymlinks                    on
DefaultServer                   on

TimeoutNoTransfer               600
TimeoutStalled                  600
TimeoutIdle                     1200

DisplayLogin                    welcome.msg
DisplayFirstChdir               .message

#此处port要设置为0
Port                            0

MaxInstances                    100

User                            nobody
Group                           nogroup

<Virtualhost "192.168.0.1">
   ServerName                   "01 Server"
   Bind                        192.168.0.1
   Port                         2121
   Group                        nogroup
   User                         nobody
   DefaultRoot                ~

  <Directory ~>
     Umask                        022  022
     AllowOverwrite                on
     AllowStoreRestart                on
  </Directory>
</Virtualhost>


<Virtualhost "192.168.1.2">
   ServerName                   "INSIDE SERVER"
   Bind                        192.168.1.2
   Port                         21
   Group                        nogroup
   User                         nobody
   DefaultRoot                ~

   <Directory ~>
      Umask                     022  022
      AllowOverwrite            on
      AllowStoreRestart         on
   </Directory>

</Virtualhost>
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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