Si prega di avvisare dove sono andato male:
Ho un nuovo mini computer a 4 porte che desidero utilizzare come router (con servizi abituali come firewall, NAT, DNS) per la mia rete in crescita. Il motivo principale è sfruttare ipset in iptables e secondariamente per prestazioni migliori. Ho due interruttori digitali collegati a eth0 e eth1 mentre il cavo Internet si collega a eth2.
Presento le seguenti impostazioni del file di configurazione e risultati. Dal mio computer desktop posso ssh nella nuova casella del gateway e da lì posso eseguire il ping di un indirizzo WAN ma non i miei indirizzi di rete locali. Ho temporaneamente reso iptables piuttosto permissivo per garantire che non sia il problema (o almeno così penso). Suppongo che ci sia un problema con dhcp basato su syslog, ma non so esattamente cosa o come risolverlo.
Grazie mille per aver trovato il tempo di aiutare!
Elenco /etc/dhcp/dhcpd.conf (righe di commento cancellate per brevità):
ddns-update-style none;
option domain-name "ptj.lan";
option domain-name-servers 208.67.222.222, 8.8.8.8;
default-lease-time 600;
max-lease-time 7200;
authoritative;
log-facility local7;
subnet 192.168.10.0 netmask 255.255.255.0 {
range 192.168.10.101 192.168.10.254;
option routers 192.168.10.60;
option domain-name-servers 208.67.222.222, 208.67.220.220;
host tractorshed {
hardware ethernet AC:CC:8E:0F:96:EC;
fixed-address 192.168.10.22;
}
host screenporch {
hardware ethernet AC:CC:8E:10:61:74;
fixed-address 192.168.10.23;
}
host carport {
hardware ethernet AC:CC:8E:10:61:6B;
fixed-address 192.168.10.21;
}
host brotherprinter {
hardware ethernet 00:1B:A9:15:65:70;
fixed-address 192.168.10.10;
}
host nuc {
hardware ethernet B8:AE:ED:7B:73:30;
fixed-address 192.168.10.32;
}
host ptj-vision {
hardware ethernet 4C:72:B9:21:0C:E4;
fixed-address 192.168.10.31;
}
}
Elenco di / etc / default / isc-dhcp-server:
DHCPD_CONF=/etc/dhcp/dhcpd.conf
DHCPD_PID=/var/run/dhcpd.pid
INTERFACES="eth0 eth2 eth3"
# I know eth1 is labelled "4" on back of box so I'll use 4 for connection to a digital switch with address 192.168.10.60 so I can reach it
e / etc / network / interfaces list:
source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto eth2
iface eth2 inet dhcp
auto eth3
iface eth3 inet dhcp
# and the static address interface (marked "4" on the box) which I'll use on LAN side for access to this machine:
auto eth1
iface eth1 inet static
address 192.168.10.60
netmask 255.255.255.0
broadcast 192.168.10.255
#stuff to rebuild ipset and iptable on reboot:
pre-up ipset restore < /home/boss/BadIPLists/genblacklist.bak
pre-up ipset restore < /home/boss/BadIPLists/sshblacklist.bak
pre-up iptables-restore < /home/boss/iptables.rules
infine, un esempio di syslog:
Jan 8 14:59:54 debFirewall dhclient: No DHCPOFFERS received.
Jan 8 14:59:54 debFirewall dhclient: No working leases in persistent database - sleeping.
Jan 8 15:04:43 debFirewall dhclient: DHCPDISCOVER on eth3 to 255.255.255.255 port 67 interval 7
Jan 8 15:04:50 debFirewall dhclient: DHCPDISCOVER on eth3 to 255.255.255.255 port 67 interval 15
Jan 8 15:05:05 debFirewall dhclient: DHCPDISCOVER on eth3 to 255.255.255.255 port 67 interval 16
Jan 8 15:05:21 debFirewall dhclient: DHCPDISCOVER on eth3 to 255.255.255.255 port 67 interval 13
Jan 8 15:05:34 debFirewall dhclient: DHCPDISCOVER on eth3 to 255.255.255.255 port 67 interval 10
Jan 8 15:05:44 debFirewall dhclient: No DHCPOFFERS received.
Jan 8 15:05:44 debFirewall dhclient: No working leases in persistent database - sleeping.
Jan 8 15:06:21 debFirewall kernel: [ 8422.877907] igb 0000:02:00.0 eth1: igb: eth1 NIC Link is Down
Jan 8 15:06:25 debFirewall kernel: [ 8427.224580] igb 0000:04:00.0 eth3: igb: eth3 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX/TX
Jan 8 15:07:17 debFirewall dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
Jan 8 15:07:22 debFirewall dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 13
Jan 8 15:07:35 debFirewall dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
Jan 8 15:07:42 debFirewall dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 11
Jan 8 15:07:53 debFirewall dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
Jan 8 15:08:00 debFirewall dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 18
Jan 8 15:08:10 debFirewall kernel: [ 8532.140374] igb 0000:04:00.0 eth3: igb: eth3 NIC Link is Down
Jan 8 15:08:18 debFirewall dhclient: No DHCPOFFERS received.
Jan 8 15:08:18 debFirewall dhclient: No working leases in persistent database - sleeping.
Jan 8 15:08:19 debFirewall kernel: [ 8540.932948] igb 0000:02:00.0 eth1: igb: eth1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX/TX