cd /usr/local/src/distfiles
#注意,igd目前尚不能与最新的upnpd 1.2.1a搭配使用;
wget http://umn.dl.sourceforge.net/sourc...dk-1.0.4.tar.gz
wget http://umn.dl.sourceforge.net/sourc...nuxigd-0.92.tgz
tar xfz upnpsdk-1.0.4.tar.gz -C ..
tar xfz linuxigd-0.92.tgz -C ..
cd ../upnpsdk-1.0.4
#vi src/ssdp/ssdplib.c
##goto line 406
SelfAddr.sin_addr.s_addr = inet_addr(SSDP_IP);
##change to
SelfAddr.sin_addr.s_addr = htonl(INADDR_ANY);
##
make && make install
ln -s /sbin/iptables /usr/sbin
cd /usr/local/src/linux-igd/
make && make install
#假设网关的外网口是pppoe拨号后的ppp0,eth0是内网卡。
route add -net 239.0.0.0 netmask 255.0.0.0 eth0
upnpd ppp0 eth0
#
#在内网,退出你的msn再登陆,会在网关看到如下信息:
#tail -f /var/log/debug
###
#172.16.100.254是我的linux网关的内网卡地址;
Jan 13 19:54:25 dbclone upnpd: Intializing UPnP with desc_doc_url=http://172.16.100.254:2869/gatedesc.xml
Jan 13 19:54:25 dbclone upnpd: ipaddress=172.16.100.254 port=2869
Jan 13 19:54:25 dbclone upnpd: conf_dir_path=/etc/linuxigd/
Jan 13 19:54:27 dbclone upnpd: UPnP Initialization Completed
Jan 13 19:54:27 dbclone upnpd: Setting webserver root directory -- /etc/linuxigd/
Jan 13 19:54:27 dbclone upnpd: Registering the root device
Jan 13 19:54:27 dbclone upnpd: RootDevice Registered
Jan 13 19:54:27 dbclone upnpd: Initializing State Table
Jan 13 19:54:27 dbclone upnpd: State Table Initialized
Jan 13 19:54:27 dbclone upnpd: Advertisements Sent
#upnpd初始化完毕
#内网msn登陆时,upnpd自动设置iptables:
Jan 13 20:00:49 dbclone upnpd: AddPortMap: RemoteHost: (null) Prot: 6 ExtPort: 9156 Int: 172.16.100.163.3216
#试试测试文件传输,快了。
### 没有试过在ipcop下安装,有谁有机会的试试。
因为不知道在ipcop安装软件包是否和完全版本的linux下一样? 老大,这东西能不能用到ipcop路由上啊?具体怎么操作? ipcop和smoothwall是一样的,可以用 smoothwall上怎么用的啊?老大!~~
页:
[1]