Rev*_*ica 8 server wireless networking raspberrypi
我目前正在做一个项目,用我的 RaspberryPi 制作一个高度安全的路由器,以便在网上匿名导航。但是,我无法正确配置守护程序以完成与新服务器的互联网连接:
确实,当我这样做时:
:~ $ sudo service isc-dhcp-server start
Run Code Online (Sandbox Code Playgroud)
我得到:
Job for isc-dhcp-server.service failed. See 'systemctl status isc-dhcp-server.service' and 'journalctl -xn' for details.
Run Code Online (Sandbox Code Playgroud)
这是我的/etc/dhcp/dhcpd.conf设置
authoritative;
#added
subnet 192.168.42.0 netmask 255.255.255.0{
range 192.168.42.10 192.168.42.50;
option broadcast-adress 192.168.42.255;
option routers 192.168.42.1;
default-lease-time 600;
max-lease-time 7200;
option domain-name "local";
option domain-name-servers 8.8.8.8, 8.8.4.4;
}
Run Code Online (Sandbox Code Playgroud)
这是我的/etc/network/interfaces设置:
source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback
iface eth0 inet manual
allow-hotplug wlan0
iface wlan0 inet static
adress 192.168.42.1
netmask 255.255.255.0
iface wlan0 inet dhcp
iface eth0 inet manual
allow-hotplug wlan0
iface wlan0 inet static
adress 192.168.42.1
netmask 255.255.255.0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
allow-hotplug wlan1
iface wlan1 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
up iptables-restore < /etc/iptables.ipv4.nat
Run Code Online (Sandbox Code Playgroud)
我的 RaspberryPi 是有线连接的,但有一个 wifi 加密狗
这里是 systemctl status isc-dhcp-server.service
:~ $ systemctl status isc-dhcp-server.service
? isc-dhcp-server.service - LSB: DHCP server
Loaded: loaded (/etc/init.d/isc-dhcp-server)
Active: failed (Result: exit-code) since Tue 2016-06-07 00:13:45 CEST; 53s ago
Process: 18098 ExecStart=/etc/init.d/isc-dhcp-server start (code=exited, status=1/FAILURE)
Run Code Online (Sandbox Code Playgroud)
有些部分是用可怕的红色写的......
这是 journalctl
-- Logs begin at Mon 2016-06-06 21:17:01 CEST, end at Tue 2016-06-07 00:18:32 CEST. --
Jun 07 00:13:45 raspberrypi isc-dhcp-server[18098]: than a configuration issue please read the section on submitting
Jun 07 00:13:45 raspberrypi isc-dhcp-server[18098]: bugs on either our web page at www.isc.org or in the README file
Jun 07 00:13:45 raspberrypi isc-dhcp-server[18098]: before submitting a bug. These pages explain the proper
Jun 07 00:13:45 raspberrypi isc-dhcp-server[18098]: process and the information we find helpful for debugging..
Jun 07 00:13:45 raspberrypi isc-dhcp-server[18098]: exiting.
Jun 07 00:17:01 raspberrypi CRON[18118]: pam_unix(cron:session): session opened for user root by (uid=0)
Jun 07 00:17:01 raspberrypi CRON[18122]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Jun 07 00:17:01 raspberrypi CRON[18118]: pam_unix(cron:session): session closed for user root
Jun 07 00:18:32 raspberrypi sudo[18139]: pi : TTY=pts/0 ; PWD=/home/pi ; USER=root ; COMMAND=/bin/journalctl -xn
Jun 07 00:18:32 raspberrypi sudo[18139]: pam_unix(sudo:session): session opened for user root by pi(uid=0)
Run Code Online (Sandbox Code Playgroud)
事情是这样的:
最明显的就是在这里写上带有两个“d”的地址:
subnet 192.168.42.0 netmask 255.255.255.0{
range 192.168.42.10 192.168.42.50;
option broadcast-adress 192.168.42.255;
option routers 192.168.42.1;
default-lease-time 600;
max-lease-time 7200;
option domain-name "local";
option domain-name-servers 8.8.8.8, 8.8.4.4;
}
Run Code Online (Sandbox Code Playgroud)
第二个是通过运行以下命令来启动无线网络:
sudo ifup wlan0
Run Code Online (Sandbox Code Playgroud)
service isc-dhcp-server多亏了这个 raspberrypihq 教程,我才能够开始将 RPi 变成路由器。
然而,我现在有问题要处理sudo update-rc.d isc-dhcpd-server enable。任何帮助将受到热烈欢迎!
| 归档时间: |
|
| 查看次数: |
98750 次 |
| 最近记录: |