Bad range, adress xx.not xx in xx subnet.xx?

Good morning! I work as a web developer in a single organization, and some time ago became a developer animasyon, without the right choice. There is a need to configure the server
1.proxy
2.dhcp
3.sambaFiles

Ubuntu server 14.04

Because the networks are not BAM-BAM, at this point completely stuck on setting up isc-dhcp-server
Here is my interfaces file
The contents of the file
---
/etc/dhcp/dhcpd.conf
The contents of the file
---
/etc/default/isc-dhcp-server
The contents of the file
Get the following error
bad range, address 192.168.8.20 not in the subnet 192.168.8.0 netmask 255.255.255.255

How to solve it, thanks!
July 8th 19 at 11:16
2 answers
July 8th 19 at 11:18
Solution
You have in /etc/interfaces and /etc/dhcp/dhcpd.conf network mask are exposed to 255.255.255.255 , it means that Your interface can only communicate with the router ( point-to-point ) i.e. yourself in this case , which for Your purposes is not suitable.
Change the mask for example 255.255.255.0 in both files and everything should start)
thanks changed that, but the problem is that now the server doesn't start, writes Fail to start and no more information is given, where are the logs? - Efren.Witting commented on July 8th 19 at 11:21
: look at dmesg and /var/log/syslog
and configure which interface will run dhcp server
in Your case, I understand it's eth1 (because only he was static IP address)

/etc/default/isc-dhcp-server
INTERFACES="eth1" - Mackenzie.Rogahn71 commented on July 8th 19 at 11:24
: I have eth0 looks in a global network, and eth1 looks in the local, just now, all under settings and I have set dhcp, connecting from the router.
in /etc/default/isc-dhcp-server
INTERFACES="ethХ" you need to specify only the interface which looks in an Internet, right? - Efren.Witting commented on July 8th 19 at 11:27
: and if the server is unable to start due to the fact that there is /etc/default/isc-dhcp-server
INTERFACES="eth0" specified, and in the interfaces at eth0 is DHCP? - Efren.Witting commented on July 8th 19 at 11:30
: in the log that is written after starting the server?
in the INTERFACES must be the interface which looks in a local network and connected clients to get addresses. the ip address of the interface must be static - Mackenzie.Rogahn71 commented on July 8th 19 at 11:33
circuit should be such:

InternetRouter -> eth0 (dhcp ip address) - [Your server with Your isc-dhcp-server om ] - eth1 <- switch <- client1, client2, client3 - Mackenzie.Rogahn71 commented on July 8th 19 at 11:36
: /var/log/syslog pastebin.com/JeXqjYuk - Efren.Witting commented on July 8th 19 at 11:39
: what do You have in /etc/default/isc-dhcp-server
INTERFACES= ?

must be INTERFACES="eth1" - Mackenzie.Rogahn71 commented on July 8th 19 at 11:42
and there - Efren.Witting commented on July 8th 19 at 11:45
strange
and there in the system file /etc/dhcp3/dhcpd.conf
and if you have something in it? - Mackenzie.Rogahn71 commented on July 8th 19 at 11:48
: also, change the range here

subnet 192.168.8.0 netmask 255.255.255.255 {
range 192.168.8.2 192.168.8.20;
option domain-name-servers 195.230.130.97 ;
# option domain-name "internal.example.org";
# option routers 10.5.5.1;
# option broadcast-address 10.5.5.31;
default-lease-time 600;
max-lease-time 7200;
} - Mackenzie.Rogahn71 commented on July 8th 19 at 11:51
: /etc/dhcp3/dhcpd.conf no range changed, but the server still doesn't start - Efren.Witting commented on July 8th 19 at 11:54
send again the content
/etc/interfaces
/etc/dhcp/dhcpd.conf
/etc/default/isc-dhcp-server

what is now true and produces this error. and I was confused that You've changed and what not) - Mackenzie.Rogahn71 commented on July 8th 19 at 11:57
and ifconfig -a - Mackenzie.Rogahn71 commented on July 8th 19 at 12:00
:
-----------------
/etc/dhcp/dhcpd.conf
pastebin.com/LVt3rKSk
----------------------------
/etc/default/isc-dhcp-server
pastebin.com/6d6PN8tv
---------------------------------
/etc/network/interfaces
pastebin.com/KHZaKsqd - Efren.Witting commented on July 8th 19 at 12:03
ifconfig -a
pastebin.com/cex04aAE - Efren.Witting commented on July 8th 19 at 12:06
: so)
First and most importantly. Do not disturb the two networks into one. You on eth0 issued address 192.168.8.28 from the network 192.168.8.0/24 and You want to get your dhcp to hand out addresses from the same network. So no need to do. at least in Your situation

Second: try to bring the configuration to the following form:

/etc/dhcp/dhcpd.conf

subnet 192.168.7.0 netmask 255.255.255.0 {
range 192.168.7.2 192.168.8.20;
option domain-name-servers 195.230.130.97 ;
# option domain-name "internal.example.org";
option routers 192.168.7.1;
# option broadcast-address 10.5.5.31;
default-lease-time 600;
max-lease-time 7200;
}

/etc/interfaces

#local network interface
auto eth1
iface eth1 inet static
address 192.168.7.1
netmask 255.255.255.0

Third: You have no eth1 address. perhaps the interface was not up for some reason (I think because of the typo in the config file in the "adress").
after I apply my changes to config, try ifconfig eth1 down ; ifconfig eth1 up
or at least reboot

again, if there are problems send the log and ifconfig -a - Mackenzie.Rogahn71 commented on July 8th 19 at 12:09
: all wound up, thanks a lot. It remains to configure NAT, that worked, that I will have no problems. But such a question, we in organization a lot of routers there, I just need to set up a DHCP server on the router specifying the ip range, or is this not on the router. On top of everything else, I'll do so that IP tied to the Mac, so the issue with the router open, prompt? - Efren.Witting commented on July 8th 19 at 12:12
do not quite understand about routers.
You want to dhcp server only on this machine which you are currently configured?
if so, then the routers need to disable dhcp so that they work as switches
about Mac addresses, it should be done again on the server where dhcp is installed
there's just rules prescribed - Mackenzie.Rogahn71 commented on July 8th 19 at 12:15
: regarding Mac address that I know. That is, what WIFI router handed out the IP only server, I just disable it the DHCP server? and I still have a question for NAT overdue, I do not understand what to enter in /etc/nat in the line
iptables-t nat -A POSTROUTING -o eth0 -s 192.168.7.1/24-j MASQUERADE
here in this form on my client is a ping to 8.8.8.8 to ya.ru and others may not. The browser is also not opening the sites, can you explain what does this line and what is there to write? - Efren.Witting commented on July 8th 19 at 12:18
: Yes, just disable dhcp on the routers. but You understand that they all need to be connected physically to the server to the interface eth1 ?
no ping to domains because customers don't know where to resolvethe names.
You have DNS server is this:
option domain-name-servers 195.230.130.97 ;
it has ping?
if not, you can change this
option domain-name-servers 8.8.8.8;

after connecting the client to the server which it receives the ip, mask, gateway, dns ? - Mackenzie.Rogahn71 commented on July 8th 19 at 12:21
: Look, plugged in the cable directly from the server to the client.
The client receives the following setting:
ip: 192.168.7.2
mask: 255.255.255.0
default gateway: 192.168.7.1
DHCP server: 192.168.7.1
DNS server: 195.230.130.97

ping to 195.230.130.97 is not set in /etc/nat and /etc/dhcp/dhcpd.conf DNS 8.8.8.8 to him, too, ping was not. I have uncomfortable questions to ask. Thank you for helping!) - Efren.Witting commented on July 8th 19 at 12:24
but You wrote that the ping to 8.8.8.8 is
if no, then NAT is not configured correctly.
what is the output of iptables-save?

do not hesitate to ask) you can even mark the answer as solution if this helped You) - Mackenzie.Rogahn71 commented on July 8th 19 at 12:27
# Generated by iptables-save v1.4.21 on Thu Jul 1 10:20:28 2016
*nat
:PREROUTING POLICY ACCEPT [956:70469]
:INPUT ACCEPT [66:14111]
:OUTPUT ACCEPT [296:22830]
:POSTROUTING ACCEPT [408:31112]
-A POSTROUTING -s 8.8.4.0/24 -o eth0 -j MASQUERADE
COMMIT
# Completed on Thu Jul 1 10:20:28 2016
# Generated by iptables-save v1.4.21 on Thu Jul 1 10:20:28 2016
*filter
:INPUT ACCEPT [4839:2752417]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [3125:421363]
-A INPUT-i lo -j ACCEPT
-A FORWARD -i eth1 -o eth0 -j ACCEPT
-A FORWARD -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -i eth0 -o eth1 -j REJECT --reject-with icmp-port-unreachable
COMMIT
# Completed on Thu Jul 1 10:20:28 2016

At the moment I postali in /etc/nat value 8.8.4.4/24 in /etc/dhcp/dhcpd.conf 8.8.4.4
In this configuration, nothing is pinged. - Efren.Witting commented on July 8th 19 at 12:30
: in principle all right. only here

-A POSTROUTING -s 8.8.4.0/24 -o eth0 -j MASQUERADE

instead, these are the rules try to make

-A POSTROUTING -o eth0 -j MASQUERADE

and what do You have in /proc/sys/net/ipv4/ip_forward ? must be 1, otherwise forwarding will not work

try it, if it does not, write. question Your problem) - Mackenzie.Rogahn71 commented on July 8th 19 at 12:33
my /etc/nat at the beginning of the file contains echo 1 > /proc/sys/net/ipv4/ip_forward
whether in this case, in the file proc/sys/net/ipv4/ip_forward to write settings? He is now completely empty. - Efren.Witting commented on July 8th 19 at 12:36
remove echo 1 > /proc/sys/net/ipv4/ip_forward from /etc/nat

add/modify in /etc/sysctl.conf:
net.ipv4.ip_forward = 1

then /etc/init.d/procps.sh restart
and better reboot the machine.

try ping from the client

if not, send Your /etc/nat and make
cat /proc/sys/net/ipv4/ip_forward
and
iptables-save
and all here!) - Mackenzie.Rogahn71 commented on July 8th 19 at 12:39
: kpces@RADA-SERVER:~$ cat /proc/sys/net/ipv4/ip_forward
1
-----------------
/etc/nat

#!/bin/sh

#Allow traffic on lo
iptables -A INPUT-i lo -j ACCEPT

#Allow access from the internal network to the outside
iptables-A FORWARD -i eth1 -o eth0 -j ACCEPT

#Include NAT
iptables-t nat -A POSTROUTING -O eth0 -j MASQUERADE

#Allow replies from external network
iptables-A FORWARD -i eth0 -m state --state ESTABLISHED,RELATED-j ACCEPT

#Forbid access from outside the internal network
iptables-A FORWARD -i eth0 -o eth1 -j REJECT
-----------------------
iptables-save

# Generated by iptables-save v1.4.21 on Tue Jul 4 11:56:22 2016
*filter
:INPUT ACCEPT [2147:1396335]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [1958:246415]
-A INPUT-i lo -j ACCEPT
-A FORWARD -i eth1 -o eth0 -j ACCEPT
-A FORWARD -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -i eth0 -o eth1 -j REJECT --reject-with icmp-port-unreachable
COMMIT
# Completed on Mon Jul 4 11:56:22 2016 - Efren.Witting commented on July 8th 19 at 12:42
July 8th 19 at 11:20
Mask 255.255.255.0 will be rather for the local area. Edit the file interfaces
Thanks but it keeps saying, SERVER is ISC dhcpd start faild
Stop dhcpd ISC SERVER faild - Efren.Witting commented on July 8th 19 at 11:23
advise the literature on networking for inexperienced user? - Mackenzie.Rogahn71 commented on July 8th 19 at 11:26

Find more questions by tags Ubuntu Server