【求助】設定NAT的問題



贊助商連結


devilgod
2002-02-20, 10:23 PM
不好意思post出來三篇空白的文章,但我有寫內容,
由於post出來都是空的,只好用回覆的方式把問題說出來..

http://www.infoshop.com.tw/teachdocs/ipchains_howto.htm
以下是我依照上面網址在設定NAT時碰到的問題
(1)
#ipchains -P forward DENY
上面是我的指令,但是卻出現下面的訊息
ipchains:Protocol not available

ipchains的版本ipchains 1.3.10,1-Sep-2000
(2)
depmod -a
depmod:*** Unresolved symbols in /lib/modules/2.4/chinese/encode-big5.o
depmod:*** Unresolved symbols in /lib/modules/2.4/chinese/encode-gb.o
depmod:*** Unresolved symbols in /lib/modules/2.4/chinese/encode-gbk.o
depmod:*** Unresolved symbols in /lib/modules/2.4/chinese/encode-jis.o
depmod:*** Unresolved symbols in /lib/modules/2.4/chinese/encode-kscm.o
不知道是什麼問題

(3)
輸入modprobe ip_masq_ftp
出現modprobe:Can't locate module ip_masq_ftp

贊助商連結


rachel
2002-02-21, 09:39 AM
1.先確定你的Linux版本是什麼呢?
2.確定你有沒有這些模組?
3.www.study-area.net是一個不錯的增進功力的好地方

devilgod
2002-02-21, 11:41 AM
我是裝mandrake8.1
其它的模組我就不知道要裝什麼了。

VBird
2002-02-21, 01:31 PM
最初由 devilgod 發表
我是裝mandrake8.1
其它的模組我就不知道要裝什麼了。
哈囉!你得先確認一下你的核心版本呢!因為較近的核心(2.4.xx)預設應該是 iptables 的 NAT 設定,與 ipchains 不一樣呦!底下有幾篇小文章建議你先看看!
http://aerosol.ev.ncku.edu.tw/~vbird/linux_redhat7.2/18linux.html
http://www.study-area.org/tips/iptables.htm
http://www.study-area.org/linux/servers/linux_nat.htm
基本上,使用 uname -r 就可以知道核心的版本,然後再來決定你的 NAT 的設定囉!

devilgod
2002-02-21, 04:38 PM
我已經把NAT設定好了,果真是用iptables
謝謝啦

還有個問題,就是我的DHCP跑不起來
輸入#dhcpd start
就會出現下面的訊息
Internet Software Consortiun DHCP Server V3.0rc12
Copyright 1995-2001 Internet Software Consortiun.
All rights reserved.
For info,please visit http://www.isc.org/products/DhCP

**You must add a ddns-update-style statement to /etc/dhcpd.conf.
To get the same behaviour as in3.0b2pl11 and previous
versions, add a line that says "ddns-uupdate-style ad-hoc;"
Please read the dhcpd.conf manual page for more information.**
......................
(中間的訊息略過)
......................
exiting.

我的dhcpd.conf如下:
default-lease-time 259200;
max-lease-time 777600;
option domain-name "alex";
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.200 192.168.1.254;
option broadcast-address 192.168.0.255;
option routers 192.168.1.1;
option subnet-mask 255.255.255.0;
option domain-name-servers 192.168.1.1;
}

devilgod
2002-02-21, 04:44 PM
最初由 devilgod 發表
我已經把NAT設定好了,果真是用iptables
謝謝啦

還有個問題,就是我的DHCP跑不起來
輸入#dhcpd start
就會出現下面的訊息
Internet Software Consortiun DHCP Server V3.0rc12
Copyright 1995-2001 Internet Software Consortiun.
All rights reserved.
For info,please visit http://www.isc.org/products/DhCP

**You must add a ddns-update-style statement to /etc/dhcpd.conf.
To get the same behaviour as in3.0b2pl11 and previous
versions, add a line that says "ddns-uupdate-style ad-hoc;"
Please read the dhcpd.conf manual page for more information.**
......................
(中間的訊息略過)
......................
exiting.

我的dhcpd.conf如下:
default-lease-time 259200;
max-lease-time 777600;
option domain-name "alex";
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.200 192.168.1.254;
option broadcast-address 192.168.0.255;
^^^^^^^^^^^^^
這裡打錯了,應該是192.168.1.255
option routers 192.168.1.1;
option subnet-mask 255.255.255.0;
option domain-name-servers 192.168.1.1;
}

還有我照上面的在dhcpd.conf第一行加上
ddns-update-style none;
還是不行....

tsaimj
2002-03-19, 09:00 PM
最初由 devilgod 發表
我已經把NAT設定好了,果真是用iptables
謝謝啦

還有個問題,就是我的DHCP跑不起來
輸入#dhcpd start
就會出現下面的訊息
Internet Software Consortiun DHCP Server V3.0rc12
Copyright 1995-2001 Internet Software Consortiun.
All rights reserved.
For info,please visit http://www.isc.org/products/DhCP

**You must add a ddns-update-style statement to /etc/dhcpd.conf.
To get the same behaviour as in3.0b2pl11 and previous
versions, add a line that says "ddns-uupdate-style ad-hoc;"
Please read the dhcpd.conf manual page for more information.**
......................
(中間的訊息略過)
......................
exiting.

我的dhcpd.conf如下:
default-lease-time 259200;
max-lease-time 777600;
option domain-name "alex";
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.200 192.168.1.254;
option broadcast-address 192.168.0.255;
option routers 192.168.1.1;
option subnet-mask 255.255.255.0;
option domain-name-servers 192.168.1.1;
}


您好:
我也是裝Mandrake8.1,
我的NAT也架不起來,
遇到跟你一樣的問題,
能不能麻煩您詳細寫出您做了哪些動作後就完成了呢?
感激不盡!我搞了好久說!:confused:
謝謝!
至於我的DHCP,
我灌完就可以正常運作了。