I'm looking for a thorough tutorial on how to configure:
Modem (77.77.7.76) -> Centos 7 -> 192.168.1.0 -> DHCP -> 100 host
Please look at my configuration.
Two network interfaces:
enp0f0
enp0f1
On both cards I set static 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 runs the Internet without problem.
My configuration:
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 install dhcp
nano /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 restart dhcpd
systemctl enable dhcpd
My zone setings.
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:
What am I doing wrong? What am I missing?
Thanks!
PS. Welcome!
Thank you for the tips to follow. I'm a new user. I will become better :-)
I have not changed anything in the zone.
It is default.
Tomorrow I will work with the zones.
The ISP assigns an IP address. Ip is static. The enp0f0 interface is set. The Internet works.
I also think that firewalls settings.
Thanks for the suggestion from NethServer 7.
I want to enable Samba and Dansguardian services.
Yes. NethServer 7 it is ugly as hell ;-) Demo also has bugs.