• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
  • Linux中的ADSL共享上網

    發表于:2007-07-04來源:作者:點擊數: 標簽:
    source: http://blog.chinaunix.net/article.php?articleId=20375blogId=5935 網絡 共享很重要哦,當然在 linux 下也可以做到 1、 網卡配置。 兩塊網卡,eth0為撥號網卡,IP:192.168.1.1(其他的地址也可);eth1為內網網卡,IP:192.168.0.1。掩碼均為255.2

    source: http://blog.chinaunix.net/article.php?articleId=20375&;blogId=5935

    網絡共享很重要哦,當然在linux下也可以做到

    1、 網卡配置。
    兩塊網卡,eth0為撥號網卡,IP:192.168.1.1(其他的地址也可);eth1為內網網卡,IP:192.168.0.1。掩碼均為255.255.255.0。 局域網網段為192.168.0.0。
    注意:此處兩塊網卡均不能設網關。

    2、 PPPoE軟件的升級與安裝
    1) 在
    http://www.roaringpenguin.com/pppoe/#download 下載
    2) 安裝rp-pppoe。以root身份執行
    rpm –Uvh rp-pppoe-3.5-1.i386.rpm
    3、 修改/etc/ sysctl.conf
    將其中的
    net.ipv4.ip_forward = 0
    改為
    net.ipv4.ip_forward = 1
    4、 去除ipchains模塊,只選擇iptables方法如下:
    1)setup
    2)選擇system service
    3)去除ipchains
    4)選中iptables
    5)重啟機器
    5、 PPPoE客戶端配置
    在rp-pppoe-3.5-1.i386.rpm安裝完畢后,接下來就可進行PPPoE客戶端配置了。過程如下。
    #/usr/sbin/adsl-setup
    >>> Enter your PPPoE user name: ——此處輸入撥號帳號的用戶名
    >>> Enter the Ethernet interface connected to the ADSL modem For Solaris, this is likely to be something like /dev/hme0. For Linux, it will be ethn, where n is a number. (default eth0): ——輸eth0
    >>> Enter the demand value (default no): ——輸no
    >>> Enter the DNS information here: ——輸210.52.149.2(視當地運營商的DNS服務器IP而定)
    >>> Please enter your PPPoE password: ——輸網通用戶口令
    >>> Choose a type of firewall (0-2): ——輸0
    >>> Aclearcase/" target="_blank" >ccept these settings and adjust configuration files (y/n)? ——輸y
    6、 啟動撥號連接
    /usr/sbin/adsl-start
    成功連接后,屏幕顯示Connected。
    此時這臺linux已可以上網瀏覽了。
    7、 IP偽裝
    為了使局域網中的其他機器能通過Linux服務器共享上網,至少須執行下面的命令:
    iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
    完成后,在192.168.0.0網段(網關為192.168.0.1)的PC機就可透過Linux上網了!
    8、 開機自啟動
    為了使Linux服務器能夠自動撥號,執行下面步驟。
    1)chkconfig --add adsl
    2)setup
    3)選擇system services
    4)選中ADSL
    5)OK退出
    6)打開/etc/rc.d/rc.local,在該文件的末尾添上下面語句
    echo "[OK]"
    echo "Drop ICMP form anywhere"
    echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all
    echo "[OK]"
    iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
    說明:前面四句用于關閉ICMP,防止別人Ping。
    9、 至此,一切OK,一個簡單的撥號建成了。重啟機器后,發現linux的internet共享連接已經一切就緒了,好妙?。?!

    原文轉自:http://www.kjueaiud.com

    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>