|
|
内网中有四台机子通过多功能宽带路由器上网。想在内网中架设个ftp,让外网也能访问。我进行了如下操作:
1. 在我的机子上装了vsftp,并配置完毕。
2. 在路由器上设好了端口映射。
2. 到 www.3322.org 申请了动态域名 ftpdownloads.3322.org,同时也下载了客户端程序ez-ipupdate。
3. 我的ez-ipupdate的配置文件qdns.conf 文件内容如下:
------------------------------------------------------------------------------
#!/usr/local/bin/ez-ipupdate -c
#
# example config file for ez-ipupdate
#
# this file is actually executable!
#
#下面动态域名和静态域名选一个
#动态域名
service-type=qdns
#静态域名
#service-type=qdns-static
#设置用户名和密码
user=guanhuaming:xxxxxx
#你需要更新的域名
host=ftpdownloads.3322.org
#你的网络端口
interface=eth0
#如果使用通配符,请将下面的注释去掉
#wildcard
#如果使用邮件服务器(mx)
#mx=mx.abc.com
max-interval=2073600
# please create this file and ensure that the user that ez-ipupdate is running
# as has write permissions to it then uncomment this line, if you don't your
# dyndns account will probably get banned. if you run ez-ipupdate as root (bad
# idea, use "run-as-user") then you can just uncomment this line.
#cache-file=/etc/ez-ipupdate.cache.eth1
# for the mean time we'll just use a cache file in the temp directory
cache-file=/tmp/ez-ipupdate.cache
# uncomment this once you have everything working how you want and you are
# ready to have ez-ipupdate running in the background all the time. to stop it
# you can use "killall -QUIT ez-ipupdate" under linux.
#daemon
--------------------------------------------------------------------------
4. 运行ez-ipupdtae -c qdns.conf 命令后,显示如下:
-----------------------------------------------------------------------------
Incorrectly built binary which accesses errno or h_errno directly. Needs to be fixed.
ez-ipupdate Version 3.0.10
Copyright (C) 1999-2000 Angus Mackay.
no update needed at this time
----------------------------------------------------------------------
5. 接着我试着在我自己的机子上访问我建的ftp:
ftp ftpdownloads.3322.org
可以访问,显示如下:
----------------------------------------------------------------------
[root@localhost ez-ipupdate]# ftp ftpdownloads.3322.org
Connected to ftpdownloads.3322.org (192.168.1.85).
220 (vsFTPd 1.2.1)
Name (ftpdownloads.3322.org:root): ftpdown
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
227 Entering Passive Mode (192,168,1,85,163,50)
150 Here comes the directory listing.
-rwxr----- 1 0 500 34896138 May 09 19:16 linux-2.6.6.tar.bz2
-rwxr----- 1 0 500 1851179 May 22 03:03 patch-2.6.6-bk8.bz2
drwxr-xr-x 3 0 0 4096 May 23 23:37 proE wildfire for linux
226 Directory send OK.
ftp>
--------------------------------------------------------------------
可为什么外网的人没法访问我的ftp?在windows中已经成功配好了,并且外网可以访问。 |
|