ADSL+RH8.0透明閘道器指南(轉)
ADSL+RH8.0透明閘道器指南(轉)[@more@]一) 概述:利用RH8.0實現透明閘道器內部網路機器的IP地址將由閘道器所在機器自動分配.(二) 硬體裝置:ISP VDSL MODEM(乙太網口MEDEM)一個(其他ADSL也應該可以).10M/100M自適應以太太網路卡兩個,最好找RH8.0能自動識別的網路卡.(三) 作業系統:RedHat8.0全部安裝。(四) 配置者身份:root(五) 配置過程:1.啟動“系統設定”中RedHat的“網際網路配置嚮導2.選擇xDSL裝置3.前進到DSL配置網路卡裝置選擇與VDSL MODEM相連的網路卡;提供者名稱隨便寫;賬號和密碼用ISP給的資訊。4.前進到完成介面直接選擇應用,完成VDSL的設定5.此時出現網路裝置配置工具也可以在“開始”選單中選擇該工具6.配置eth07.配置eth1靜態IP192.168.0.1是該區域網內的閘道器,預設閘道器由ISP提供,或者從windows撥號屬性中獲得(DOS命令為: ipconfig /all ).Linux下用ifconfig獲得, 如下P-t-P:後面的就是你ISP的閘道器.ppp0 Link encap:Point-to-Point Protocolinet addr:156.34.89.120 P-t-P:142.166.182.77 Mask:255.255.255.2559.配置DHCPD使內部網路機器自動獲得IP地址.修改/etc/dhcpd.conf, 修改後如下:#Start of /etc/dhcpd.confddns-update-style interim;ignore client-updates;subnet 192.168.0.0 netmask 255.255.255.0 {# --- default gatewayoption routers 192.168.0.1;option subnet-mask 255.255.255.0;option nis-domain "domain.org";option domain-name "domain.org";# --- option domain-name-servers ISPs DNS1,ISPs DNS2;option domain-name-servers 192.168.0.1,142.177.1.2,142.177.129.11;option time-offset -18000; # Eastern Standard Time# --- Selects point-to-point node (default is hybrid). Dont change this unless# -- you understand Netbios very well# option netbios-node-type 2;range dynamic-bootp 192.168.0.2 192.168.0.254;default-lease-time 21600;max-lease-time 43200;}#End of /etc/dhcpd.conf不要把192.168.0.1和192.168.0.255放在動態獲取ip範圍內就可以了正確的應該如上: range dynamic-bootp 192.168.0.2 192.168.0.254;10.修改/etc/sysconfig/iptables(把原有的內容都刪除),修改完如下,以使VDSL和代理在開機時自動生效。# Generated by iptables-save v1.2.6a on Tue Oct 29 22:28:14 2002*mangle:PREROUTING ACCEPT [3184:1818661]:INPUT ACCEPT [3182:1818397]:FORWARD ACCEPT [2:264]:OUTPUT ACCEPT [2797:234072]:POSTROUTING ACCEPT [2799:234336]COMMIT# Completed on Tue Oct 29 22:28:14 2002# Generated by iptables-save v1.2.6a on Tue Oct 29 22:28:14 2002*nat:PREROUTING ACCEPT [73:5959]:POSTROUTING ACCEPT [22:1320]:OUTPUT ACCEPT [213:12855][212:12654] -A POSTROUTING -o ppp0 -j MASQUERADECOMMIT# Completed on Tue Oct 29 22:28:14 2002# Generated by iptables-save v1.2.6a on Tue Oct 29 22:28:14 2002*filter:INPUT ACCEPT [20227:22971175]:FORWARD ACCEPT [370:103827]:OUTPUT ACCEPT [15374:1263630]COMMIT# Completed on Tue Oct 29 22:28:14 200212. 修改/etc/sysctl.conf,把net.ipv4.ip_forward設定成1,如下:net.ipv4.ip_forward = 1如此一來,每次你重新啟動機器或重新啟動網路服務(/etc/init.d/network restart)時就會自動啟動ip轉發功能!13.關閉ipchain自動啟動服務,開啟iptables自動啟動服務(如果已經設定,可以忽略這步)輸入以下命令列:[jackey@localhost jackey]$ suPassword:[root@localhost jackey]# cd /etc/init.d/[root@localhost init.d]# chkconfig --del ipchains --level 2345[root@localhost init.d]# chkconfig --add iptables --level 234514.重啟機器,進入系統後檢查是否正確啟動VDSL:(1)ifconfig 看ip地址是否正確,結果如下:[jackey@localhost jackey]$ ifconfigeth0 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XXUP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1RX packets:106296 errors:0 dropped:0 overruns:0 frame:0TX packets:105021 errors:0 dropped:0 overruns:0 carrier:0collisions:162 txqueuelen:100RX bytes:109833929 (104.7 Mb) TX bytes:17211245 (16.4 Mb)Interrupt:5 Base address:0x8000eth1 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XXinet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1RX packets:9297 errors:0 dropped:0 overruns:0 frame:0TX packets:10244 errors:0 dropped:0 overruns:0 carrier:0collisions:0 txqueuelen:100RX bytes:1254722 (1.1 Mb) TX bytes:9722244 (9.2 Mb)Interrupt:10 Base address:0x9000lo Link encap:Local Loopbackinet addr:127.0.0.1 Mask:255.0.0.0UP LOOPBACK RUNNING MTU:16436 Metric:1RX packets:3466 errors:0 dropped:0 overruns:0 frame:0TX packets:3466 errors:0 dropped:0 overruns:0 carrier:0collisions:0 txqueuelen:0RX bytes:463036 (452.1 Kb) TX bytes:463036 (452.1 Kb)ppp0 Link encap:Point-to-Point Protocolinet addr:156.34.89.120 P-t-P:142.166.182.77 Mask:255.255.255.255UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1RX packets:38629 errors:0 dropped:0 overruns:0 frame:0TX packets:28802 errors:0 dropped:0 overruns:0 carrier:0collisions:0 txqueuelen:3RX bytes:47576177 (45.3 Mb) TX bytes:2319149 (2.2 Mb)其中XX:XX:XX:XX:XX:XX是你網路卡的實體地址(2)route -n 看路由是否正確,結果如下:[jackey@localhost jackey]$ route -nKernel IP routing tableDestination Gateway Genmask Flags Metric Ref Use Iface142.166.182.77 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo0.0.0.0 142.166.182.77 0.0.0.0 UG 0 0 0 ppp0(3)iptables -t nat -L -n 看代理規則是否正確,結果如下:[root@localhost jackey]# iptables -t nat -L -nChain PREROUTING (policy ACCEPT)target prot opt source destinationChain POSTROUTING (policy ACCEPT)target prot opt source destinationMASQUERADE all -- 0.0.0.0/0 0.0.0.0/0Chain OUTPUT (policy ACCEPT)target prot opt source destination(4)cat /proc/sys/net/ipv4/ip_forward 看值是否為1,結果如下:[jackey@localhost jackey]$ cat proc/sys/net/ipv4/ip_forward 1
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8225414/viewspace-940746/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ORACLE透明閘道器的配置Oracle
- transparent gateway 透明閘道器配置Gateway
- 安全閘道器 透明加解密解密
- Oracle 透明閘道器連線MySQLOracleMySql
- ORACLE9i 的透明閘道器的配置 (轉)Oracle
- ORACLE 透明閘道器訪問 MYSQL 表OracleMySql
- Oracle透明閘道器訪問Mysql—luckyfriendsOracleMySql
- 透明的閘道器:在Linux上執行IPchains(轉)LinuxAI
- 10g透明閘道器訪問sqlserverSQLServer
- Oracle 通過透明閘道器訪問mysqlOracleMySql
- Oracle 透過透明閘道器 訪問 mysqlOracleMySql
- Oracle Gateways透明閘道器訪問SQL ServerOracleGatewaySQLServer
- oracle連線teradata透明閘道器配置Oracle
- Oracle透明閘道器訪問SQLServer資料庫OracleSQLServer資料庫
- Oracle透明閘道器訪問MySQL資料庫OracleMySql資料庫
- oracle透過透明閘道器訪問sql serverOracleSQLServer
- 透明閘道器一些特殊場景的配置
- oracle通過透明閘道器連線mysql的配置OracleMySql
- ORACLE通過透明閘道器連線DB2OracleDB2
- oracle9i透明閘道器到sqlserver的配置OracleSQLServer
- 海外電商支付閘道器避坑指南
- 透明閘道器 oracle 10g for sqlserver 和sybase的配置Oracle 10gSQLServer
- 透明閘道器的安裝配置及一般使用
- Oracle配置透明閘道器訪問sql2000OracleSQL
- Oracle 通過透明閘道器訪問mysql配置步驟OracleMySql
- Modbus轉Profinet協議轉換閘道器:快速配置實踐指南協議
- Janusec應用安全閘道器(WAF閘道器)
- Ceph物件閘道器,多區域閘道器物件
- Oracle 11.2.0.4 透過透明閘道器訪問mysql 8.0.16OracleMySql
- oracle透明閘道器之異構資料庫的訪問Oracle資料庫
- 微服務閘道器SIA-GateWay使用指南微服務Gateway
- 閘道器GatewayGateway
- gateway 閘道器Gateway
- 什麼是閘道器?閘道器的作用是什麼,閘道器的作用詳解
- 配置Oracle Gateways透明閘道器連線多個MSSQL資料庫OracleGatewaySQL資料庫
- WAP閘道器相關知識【轉】
- 反垃圾郵件閘道器原理(轉)
- SIA-GateWay之API閘道器安裝部署指南GatewayAPI