歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux綜合 >> Linux資訊 >> 更多Linux >> 如何在LINUX下用ADSL上網

如何在LINUX下用ADSL上網

日期:2017/2/27 14:18:12   编辑:更多Linux
  Linux+ADSL將會逐漸成為我們接入INTERNET的方式。我們以SuSe Linux 6.4為例,進行這種方式的具體實施。    首先,看看軟件方面的准備。SuSe 6.4已含pppoed-0.46-7。如果沒有該軟件,也可到FTP://ftp.suse.com/pub/projects/T-DSL或 http://www.suse.de/en/support/download /updates/63_update.Html下載最新版本。    設置網卡和網關:# ifconfig eth0 mtu 1492 (不要為eth0設任何IP地址)。並確保你的default gateway 為空。    Add your login name and passWord to /etc/ppp/pap-secrets and /etc/ppp/chap-secrets。    這兩個文件應象這樣: "[email protected]" * "mypassword" 編輯/etc/resolve.conf nameserver 202.96.0.100 nameserver 202.96.0.50 在/etc/modules.conf中加入下面一行: alias char-major-144 pppox 修改文件 /etc/ppp/options. # general options idle 600 # this is a must user " [email protected] " sync local nocrtscts noauth usepeerdns mru 1490 mtu 1490 # this is recommended defaultroute hide-password nodetach # # switch off all compressions # this is a must noaccomp nopcomp # this is recommended novj novjccomp nobsdcomp nodeflate noccp    注意:Replace with your own login name.    運行 /usr/sbin/pppoed開始連接。    注意:只有root 用戶可以啟動連接。    If you use a network device other than eth0, you'll need to start /usr/sbin/pppoed with the option -I ethX, where X is the number of the device。    檢驗、測試連接:用tail -f /var/log/messages可跟蹤並診斷ADSL的連接狀態,用ifconfig可以查看你的ppp0設備被分配的IP地址,如果地址分配成功,就說明已建立連接。用route命令可查看拔入服務器為你指定的網關地址。用ping www.hermes.com.cn應該可以ping通,如果不通,有可能是你的DNS設置問題。    代理局域網上網。安裝一個網卡,設置IP地址為192.168.1.1;    加入一條IP轉發的規則:/sbin/ipchains -A forward -j MASQ -s 192.168.1.0/24 -d 0.0.0.0/0。局域網內client將192.168.1.1設為缺省網關。


   現在,我們就可通過這台LINUX+ADSL代理服務器上網了。



Copyright © Linux教程網 All Rights Reserved