Centos 7 中的路由器带有 DHCP?设置中哪里可能出现错误?

Centos 7 中的路由器带有 DHCP?设置中哪里可能出现错误?

我正在寻找有关如何配置的详细教程:
调制解调器 (77.77.7.76) -> Centos 7 -> 192.168.1.0 -> DHCP -> 100 主机


请查看我的配置。
两个网络接口:

enp0f0
enp0f1

我在两张卡上都设置了静态 IP。

enp0f0

77.77.7.76
255.255.255.0
77.77.7.75

enp0f1

192.168.1.0
255.255.255.0
192.168.1.0

Centos 7 运行互联网没有问题。


我的配置:

nano /etc/sysctl.conf
net.ipv4.ip_forward=1

systemctl start firewalld

firewall-cmd --permanent --direct --passthrough ipv4 -t nat -I POSTROUTING -o enp0f0 -j MASQUERADE -s 192.168.1.0/24

systemctl restart firewalld

yum 安装 dhcp

纳米/etc/dhcp/dhcpd.conf

# Configuring subnet and iprange 
subnet 192.168.1.0 netmask 255.255.255.0 { 
range 192.168.1.10 192.168.1.210;
# Specify DNS server ip and additional DNS server ip 
option domain-name-servers 8.8.8.8, 8.8.4.4;
# Specify Domain Name option domain-name „centos.org”;
# Default Gateway 
option routers 192.168.1.2; 
option broadcast-address 192.168.1.255;
# Specify Default and Max lease time 
default-lease-time 600; 
max-lease-time 7200; 
}

systemctl 重新启动 dhcpd
systemctl 启用 dhcpd

我的区域设置。

firewall-cmd --list-all-zones
work
  target: default
  icmp-block-inversion: no
  interfaces: 
  sources: 
  services: dhcpv6-client ssh
  ports: 
  protocols: 
  masquerade: no
  forward-ports: 
  sourceports: 
  icmp-blocks: 
  rich rules: 


drop
  target: DROP
  icmp-block-inversion: no
  interfaces: 
  sources: 
  services: 
  ports: 
  protocols: 
  masquerade: no
  forward-ports: 
  sourceports: 
  icmp-blocks: 
  rich rules: 


internal (active)
  target: default
  icmp-block-inversion: no
  interfaces: enp1s0f1
  sources: 
  services: dhcp dhcpv6-client dns http mdns nfs samba-client ssh tftp
  ports: 53/udp
  protocols: 
  masquerade: no
  forward-ports: 
  sourceports: 
  icmp-blocks: 
  rich rules: 


external (active)
  target: default
  icmp-block-inversion: no
  interfaces: enp1s0f0
  sources: 
  services: ssh
  ports: 
  protocols: 
  masquerade: yes
  forward-ports: 
  sourceports: 
  icmp-blocks: 
  rich rules: 


trusted
  target: ACCEPT
  icmp-block-inversion: no
  interfaces: 
  sources: 
  services: 
  ports: 
  protocols: 
  masquerade: no
  forward-ports: 
  sourceports: 
  icmp-blocks: 
  rich rules: 


home
  target: default
  icmp-block-inversion: no
  interfaces: 
  sources: 
  services: dhcpv6-client mdns samba-client ssh
  ports: 
  protocols: 
  masquerade: no
  forward-ports: 
  sourceports: 
  icmp-blocks: 
  rich rules: 


dmz
  target: default
  icmp-block-inversion: no
  interfaces: 
  sources: 
  services: ssh
  ports: 
  protocols: 
  masquerade: no
  forward-ports: 
  sourceports: 
  icmp-blocks: 
  rich rules: 


public
  target: default
  icmp-block-inversion: no
  interfaces: 
  sources: 
  services: dhcpv6-client ssh
  ports: 53/tcp
  protocols: 
  masquerade: no
  forward-ports: 
  sourceports: 
  icmp-blocks: 
  rich rules: 


block
  target: %%REJECT%%
  icmp-block-inversion: no
  interfaces: 
  sources: 
  services: 
  ports: 
  protocols: 
  masquerade: no
  forward-ports: 
  sourceports: 
  icmp-blocks: 
  rich rules: 

我做错了什么?我遗漏了什么?

谢谢!


附言:欢迎!

感谢您提供的提示。我是新用户。我会变得更好 :-)

我没有在区域中更改任何内容。它是默认的。明天我将使用区域。ISP 分配 IP 地址。IP 是静态的。enp0f0 接口已设置。互联网正常工作。我也认为防火墙设置。感谢 NethServer 7 的建议。我想启用 Samba 和 Dansguardian 服务。
是的。NethServer 7 太丑了 ;-) 演示也有错误。

相关内容