一、Solaris DNS客户端配置
1. # vi /etc/resolv.conf
## xxx.xxx.xxx.xxx 为您isp的dns
nameserver xxx.xxx.xxx.xxx
2. # vi /etc/nsswitch.conf
修改hosts: files 为 hosts: files dns
3. reboot
二、PPPOE配置:
1.首先请确定您已安装了下列软件,假如您的系统版本低于 Solaris 8 10/01您还没有装上:
SUNWpppd - Solaris PPP Device Drivers
SUNWpppdr - Solaris PPP configuration files
SUNWpppdt - Solaris PPP Tunneling
SUNWpppdu - Solaris PPP daemon and utilities
SUNWpppdx - Solaris PPP 64-bit (ONLY needed for SPARC's with 64-bit kernels)
请执行下面简单的命令确认:
# ls /dev | grep ppp
sppp
sppptun
# grep sppp /etc/name_to_major
sppp 146
sppptun 147
2. 基本信息
拨号用户:netstorm
密 码:password
# ifconfig -a 取得网卡接口 我的为 rtls0 (Realtek8139网卡)
3. 下面是主要使用到的程式,具体怎么用我还不清楚呢!
/usr/lib/inet/pppoed
/usr/sbin/sppptun
/usr/bin/pppd
4. # touch /etc/ppp/pppoe.if (不知道什么用)
5. 创建一个 连接isp的配置文档 /etc/ppp/peers/hzcnc 内容如下:
###################### /etc/ppp/peers/hzcnc ######################
sppptun # what device to use
plugin pppoe.so # initialize the
connect "/usr/lib/inet/pppoec rtls0" #注意这里和pppd带的模板文档中不同
persist # if the connection dies, bring it back up
user "zhangfan" # username
noauth # Do not make the other side authenticate itself
noipdefault # Let them give you what IP they want to give you
# 假如您知道下面命令的意思,请不吝补充
noccp # No compression
novj # No compression
noaccomp # No compression
nopcomp # No compression
defaultroute # add an appropriate default route
####################################################################
6. 设定您的 用户验证文档。
我的连接是网通的,所以我用/etc/ppp/pap-secrets,按照前面的例子,
我设定她的内容为:
################ /etc/ppp/pap-secrets #####################
#user isp password
netstorm*password
###########################################################
注意: netstorm,*,password之间使用了 [TAB] 而不是空格
假如您的isp需要相应设定 /etc/ppp/chat-secrets 请自己搞定。
7. 创建拨号Shell文档
# vi /etc/ppp/hzcnc.sh
#!/usr/bin/sh
/usr/sbin/sppptun plumb pppoed rtls0
/usr/sbin/sppptun plumb pppoe rtls0
/usr/bin/pppd call hzcnc
#chmod a x /etc/ppp/hzcnc.sh
8. 每次开机自动拨号
# vi /etc/rc2.d/S65CallHzcnc
/etc/ppp/hzcnc.sh
9. 拨号测试
#/etc/ppp/hzcnc.sh
#ifconfig -a
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
rtls0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.0.119 netmask ffffff00 broadcast 192.168.0.255
ether 0:50:56:40:0:53
sppp0: flags=10008d1<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST,IPv4> mtu 1492 index 3
inet 218.108.204.62 --> 210.83.128.121 netmask ffffff00
ether 0:0:0:0:0:0
# ping 202.96.96.68
202.96.96.68 is alive
# ping www.spy-movie.com (此步假如不正常,证实您的dns没有配置好)
www.spy-movie.com is alive
二、IP Filter安装配置(IP转发,使局域网内客户机能通过Solaris主机上网)
1. 网络环境:
Solaris主机IP: 192.168.62.1
所在子网: 192.168.62.0/24
2. IP Filter 3.4.29下载:
http://coombs.anu.edu.au/~avalon/
3. IP Filter 安装:
# gunzip ip-fil3.4.29.tar.gz
# tar xvf ip-fil3.4.29.tar
# cd ip-fil3.4.29
# make solaris(据说不能用GNU make,我用的/usr/ccs/bin/make,下同)
# cd SunOS5
# make package(会提示安装,确定以后会自动安装完毕)
4. IP Filter 配置:
# vi /etc/opt/ipf/ipnat.conf
#加入以下规则
map sppp0 192.168.62.0/24 -> 0/32 proxy port ftp ftp/tcp
map sppp0 192.168.62.0/24 -> 0/32 portmap tcp/udp auto
map sppp0 192.168.62.0/24 -> 0/32
(系统每次重起都会启动ipf)
5. 允许IP转发
# ndd -get /dev/tcp ip_forwarding
0
假如以上结果为1,证实系统已允许ip转发,您不要任何配置
假如为0 则:
# touch /etc/gateways (这样系统每次启动,# ndd -get /dev/tcp ip_forwarding 结果都为1)
6. reboot
四、Windows客户端配置
默认网关: 192.168.62.1 (Solaris主机ip)
最好选择DNS : 210.83.130.18 (ISP DNS,最好和 Solaris中/etc/resolv.conf的 DNS相同)
配置完后,ie,qq,msn,ftp 等 应该都能够用了
五、动态ip和域名的绑定( ddclient)
文章整理:西部数码--专业提供域名注册、虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!




