Use dnsmasq to pushing routes to my clients on a small local network
I'm trying to use dnsmasq to pushing routes to my clients on a small local network.
However my clients (Server #1, #2 and #3) can not use these routes. The dnsmasq service is running and I do not know what may be going wrong.
This is the content of my "/etc/dnsmasq.conf" file:
domain-needed
bogus-priv
no-resolv
no-poll
server=/localnet/192.168.56.254
server=8.8.3.3
server=8.8.8.8
server=208.67.220.220
local=/brlightinternet.local/
interface=vboxnet0
listen-address=192.168.56.254
no-hosts
expand-hosts
domain=brlightinternet.local
dhcp-range=192.168.56.3,192.168.56.253,12h
dhcp-option=option:router,192.168.56.254
# pushing routes
dhcp-option=121,10.0.4.0/24,10.0.6.4,10.8.0.0/24,10.0.6.4,10.0.6.0/24,10.8.0.1
dhcp-option=249,10.0.4.0/24,10.0.6.4,10.8.0.0/24,10.0.6.4,10.0.6.0/24,10.8.0.1
dhcp-option=vendor:MSFT,2,1i
cache-size=150
IMPORTANT: "192.168.56.254" is not the ip of the server running dnsmasq. Its ip is "192.168.56.1". From what I understand we can assign a different ip to dnsmasq.
This is the network configuration ("/etc/sysconfig/network-scripts/ifcfg-enp0s17") on each client (Server #1, #2 and #3)...
BOOTPROTO=static
DEVICE=enp0s17
DNS1=192.168.56.254
GATEWAY=192.168.56.254
IPADDR=192.168.56.120
IPV6INIT=NO
NETMASK=255.255.255.0
NM_CONTROLLED=yes
ONBOOT=yes
TYPE=Ethernet
USERCTL=NO
ZONE=public
... only the ips change...
Server #1 -> IPADDR=192.168.56.122
Server #2 -> IPADDR=192.168.56.120
Server #3 -> IPADDR=192.168.56.121
Information about the LANs of each server...
Server #1
[root@localhost ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s17: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:12:26:e2:6c brd ff:ff:ff:ff:ff:ff
inet 192.168.56.122/24 brd 192.168.56.255 scope global noprefixroute enp0s17
valid_lft forever preferred_lft forever
inet6 fe80::a00:12ff:fe26:e26c/64 scope link
valid_lft forever preferred_lft forever
Server #2
[root@localhost ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:2c:d1:58 brd ff:ff:ff:ff:ff:ff
inet 10.0.2.10/24 brd 10.0.2.255 scope global noprefixroute dynamic enp0s8
valid_lft 888sec preferred_lft 888sec
inet6 fe80::2c5c:27aa:2636:8dc9/64 scope link noprefixroute
valid_lft forever preferred_lft forever
3: enp0s17: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:1c:a6:b9:59 brd ff:ff:ff:ff:ff:ff
inet 192.168.56.120/24 brd 192.168.56.255 scope global noprefixroute enp0s17
valid_lft forever preferred_lft forever
inet6 fe80::a00:1cff:fea6:b959/64 scope link
valid_lft forever preferred_lft forever
5: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 100
link/none
inet 10.8.0.1/24 brd 10.8.0.255 scope global tun0
valid_lft forever preferred_lft forever
inet6 fe80::6a67:7379:b64:967c/64 scope link flags 800
valid_lft forever preferred_lft forever
Server #3
[root@localhost ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:71:77:07 brd ff:ff:ff:ff:ff:ff
inet 10.0.4.4/24 brd 10.0.4.255 scope global noprefixroute dynamic enp0s8
valid_lft 1115sec preferred_lft 1115sec
inet6 fe80::899f:8ca4:a7c6:25a7/64 scope link noprefixroute
valid_lft forever preferred_lft forever
3: enp0s17: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:ea:4e:40:ae brd ff:ff:ff:ff:ff:ff
inet 192.168.56.121/24 brd 192.168.56.255 scope global noprefixroute enp0s17
valid_lft forever preferred_lft forever
inet6 fe80::a00:eaff:fe4e:40ae/64 scope link
valid_lft forever preferred_lft forever
4: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 100
link/none
inet 10.8.0.6/24 brd 10.8.0.255 scope global tun0
valid_lft forever preferred_lft forever
inet6 fe80::48c2:b3cd:5845:5d35/64 scope link flags 800
valid_lft forever preferred_lft forever
NOTE I: "ip_forward" is enabled on Server #2...
echo -n "net.ipv4.ip_forward=1
" >> /etc/sysctl.d/ip_forward.conf
sysctl -w net.ipv4.ip_forward=1
NOTE II: This thread is entirely related to the problem...
Use the LANs of one server to access the LAN of another
With this solution I can make routes without problems...
https://unix.stackexchange.com/a/457347/61742
... but without the benefit of having the thing centralized as when I use dnsmasq.
Thanks! =D
dns dhcp route router dnsmasq
|
show 3 more comments
I'm trying to use dnsmasq to pushing routes to my clients on a small local network.
However my clients (Server #1, #2 and #3) can not use these routes. The dnsmasq service is running and I do not know what may be going wrong.
This is the content of my "/etc/dnsmasq.conf" file:
domain-needed
bogus-priv
no-resolv
no-poll
server=/localnet/192.168.56.254
server=8.8.3.3
server=8.8.8.8
server=208.67.220.220
local=/brlightinternet.local/
interface=vboxnet0
listen-address=192.168.56.254
no-hosts
expand-hosts
domain=brlightinternet.local
dhcp-range=192.168.56.3,192.168.56.253,12h
dhcp-option=option:router,192.168.56.254
# pushing routes
dhcp-option=121,10.0.4.0/24,10.0.6.4,10.8.0.0/24,10.0.6.4,10.0.6.0/24,10.8.0.1
dhcp-option=249,10.0.4.0/24,10.0.6.4,10.8.0.0/24,10.0.6.4,10.0.6.0/24,10.8.0.1
dhcp-option=vendor:MSFT,2,1i
cache-size=150
IMPORTANT: "192.168.56.254" is not the ip of the server running dnsmasq. Its ip is "192.168.56.1". From what I understand we can assign a different ip to dnsmasq.
This is the network configuration ("/etc/sysconfig/network-scripts/ifcfg-enp0s17") on each client (Server #1, #2 and #3)...
BOOTPROTO=static
DEVICE=enp0s17
DNS1=192.168.56.254
GATEWAY=192.168.56.254
IPADDR=192.168.56.120
IPV6INIT=NO
NETMASK=255.255.255.0
NM_CONTROLLED=yes
ONBOOT=yes
TYPE=Ethernet
USERCTL=NO
ZONE=public
... only the ips change...
Server #1 -> IPADDR=192.168.56.122
Server #2 -> IPADDR=192.168.56.120
Server #3 -> IPADDR=192.168.56.121
Information about the LANs of each server...
Server #1
[root@localhost ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s17: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:12:26:e2:6c brd ff:ff:ff:ff:ff:ff
inet 192.168.56.122/24 brd 192.168.56.255 scope global noprefixroute enp0s17
valid_lft forever preferred_lft forever
inet6 fe80::a00:12ff:fe26:e26c/64 scope link
valid_lft forever preferred_lft forever
Server #2
[root@localhost ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:2c:d1:58 brd ff:ff:ff:ff:ff:ff
inet 10.0.2.10/24 brd 10.0.2.255 scope global noprefixroute dynamic enp0s8
valid_lft 888sec preferred_lft 888sec
inet6 fe80::2c5c:27aa:2636:8dc9/64 scope link noprefixroute
valid_lft forever preferred_lft forever
3: enp0s17: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:1c:a6:b9:59 brd ff:ff:ff:ff:ff:ff
inet 192.168.56.120/24 brd 192.168.56.255 scope global noprefixroute enp0s17
valid_lft forever preferred_lft forever
inet6 fe80::a00:1cff:fea6:b959/64 scope link
valid_lft forever preferred_lft forever
5: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 100
link/none
inet 10.8.0.1/24 brd 10.8.0.255 scope global tun0
valid_lft forever preferred_lft forever
inet6 fe80::6a67:7379:b64:967c/64 scope link flags 800
valid_lft forever preferred_lft forever
Server #3
[root@localhost ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:71:77:07 brd ff:ff:ff:ff:ff:ff
inet 10.0.4.4/24 brd 10.0.4.255 scope global noprefixroute dynamic enp0s8
valid_lft 1115sec preferred_lft 1115sec
inet6 fe80::899f:8ca4:a7c6:25a7/64 scope link noprefixroute
valid_lft forever preferred_lft forever
3: enp0s17: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:ea:4e:40:ae brd ff:ff:ff:ff:ff:ff
inet 192.168.56.121/24 brd 192.168.56.255 scope global noprefixroute enp0s17
valid_lft forever preferred_lft forever
inet6 fe80::a00:eaff:fe4e:40ae/64 scope link
valid_lft forever preferred_lft forever
4: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 100
link/none
inet 10.8.0.6/24 brd 10.8.0.255 scope global tun0
valid_lft forever preferred_lft forever
inet6 fe80::48c2:b3cd:5845:5d35/64 scope link flags 800
valid_lft forever preferred_lft forever
NOTE I: "ip_forward" is enabled on Server #2...
echo -n "net.ipv4.ip_forward=1
" >> /etc/sysctl.d/ip_forward.conf
sysctl -w net.ipv4.ip_forward=1
NOTE II: This thread is entirely related to the problem...
Use the LANs of one server to access the LAN of another
With this solution I can make routes without problems...
https://unix.stackexchange.com/a/457347/61742
... but without the benefit of having the thing centralized as when I use dnsmasq.
Thanks! =D
dns dhcp route router dnsmasq
@galaxy Thread related to configuring dnsmasq as a router: serverfault.com/a/575936/276753
– Eduardo Lucio
Jul 20 at 23:46
@dirkt I think this may interest you!
– Eduardo Lucio
Jul 20 at 23:48
@RuiFRibeiro I think this may interest you!
– Eduardo Lucio
Jul 20 at 23:49
1
I would advise a multi-homed DHCP server ISC-DHCP or Kea. dnsmasq is just suited for home networks/vm dual DNS setups/local DNS cache. We do not get notifications without posting in a thread btw.
– Rui F Ribeiro
Jul 21 at 4:31
1
@RuiFRibeiro In view of your last comment and the explanations of Isaac I will try isc.org/kea (kea), because dnsmasq seems to be very limited even for a very small thing and I am having a bit of trouble finding information about how to use it. Thank you both! =D
– Eduardo Lucio
Jul 23 at 18:21
|
show 3 more comments
I'm trying to use dnsmasq to pushing routes to my clients on a small local network.
However my clients (Server #1, #2 and #3) can not use these routes. The dnsmasq service is running and I do not know what may be going wrong.
This is the content of my "/etc/dnsmasq.conf" file:
domain-needed
bogus-priv
no-resolv
no-poll
server=/localnet/192.168.56.254
server=8.8.3.3
server=8.8.8.8
server=208.67.220.220
local=/brlightinternet.local/
interface=vboxnet0
listen-address=192.168.56.254
no-hosts
expand-hosts
domain=brlightinternet.local
dhcp-range=192.168.56.3,192.168.56.253,12h
dhcp-option=option:router,192.168.56.254
# pushing routes
dhcp-option=121,10.0.4.0/24,10.0.6.4,10.8.0.0/24,10.0.6.4,10.0.6.0/24,10.8.0.1
dhcp-option=249,10.0.4.0/24,10.0.6.4,10.8.0.0/24,10.0.6.4,10.0.6.0/24,10.8.0.1
dhcp-option=vendor:MSFT,2,1i
cache-size=150
IMPORTANT: "192.168.56.254" is not the ip of the server running dnsmasq. Its ip is "192.168.56.1". From what I understand we can assign a different ip to dnsmasq.
This is the network configuration ("/etc/sysconfig/network-scripts/ifcfg-enp0s17") on each client (Server #1, #2 and #3)...
BOOTPROTO=static
DEVICE=enp0s17
DNS1=192.168.56.254
GATEWAY=192.168.56.254
IPADDR=192.168.56.120
IPV6INIT=NO
NETMASK=255.255.255.0
NM_CONTROLLED=yes
ONBOOT=yes
TYPE=Ethernet
USERCTL=NO
ZONE=public
... only the ips change...
Server #1 -> IPADDR=192.168.56.122
Server #2 -> IPADDR=192.168.56.120
Server #3 -> IPADDR=192.168.56.121
Information about the LANs of each server...
Server #1
[root@localhost ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s17: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:12:26:e2:6c brd ff:ff:ff:ff:ff:ff
inet 192.168.56.122/24 brd 192.168.56.255 scope global noprefixroute enp0s17
valid_lft forever preferred_lft forever
inet6 fe80::a00:12ff:fe26:e26c/64 scope link
valid_lft forever preferred_lft forever
Server #2
[root@localhost ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:2c:d1:58 brd ff:ff:ff:ff:ff:ff
inet 10.0.2.10/24 brd 10.0.2.255 scope global noprefixroute dynamic enp0s8
valid_lft 888sec preferred_lft 888sec
inet6 fe80::2c5c:27aa:2636:8dc9/64 scope link noprefixroute
valid_lft forever preferred_lft forever
3: enp0s17: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:1c:a6:b9:59 brd ff:ff:ff:ff:ff:ff
inet 192.168.56.120/24 brd 192.168.56.255 scope global noprefixroute enp0s17
valid_lft forever preferred_lft forever
inet6 fe80::a00:1cff:fea6:b959/64 scope link
valid_lft forever preferred_lft forever
5: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 100
link/none
inet 10.8.0.1/24 brd 10.8.0.255 scope global tun0
valid_lft forever preferred_lft forever
inet6 fe80::6a67:7379:b64:967c/64 scope link flags 800
valid_lft forever preferred_lft forever
Server #3
[root@localhost ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:71:77:07 brd ff:ff:ff:ff:ff:ff
inet 10.0.4.4/24 brd 10.0.4.255 scope global noprefixroute dynamic enp0s8
valid_lft 1115sec preferred_lft 1115sec
inet6 fe80::899f:8ca4:a7c6:25a7/64 scope link noprefixroute
valid_lft forever preferred_lft forever
3: enp0s17: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:ea:4e:40:ae brd ff:ff:ff:ff:ff:ff
inet 192.168.56.121/24 brd 192.168.56.255 scope global noprefixroute enp0s17
valid_lft forever preferred_lft forever
inet6 fe80::a00:eaff:fe4e:40ae/64 scope link
valid_lft forever preferred_lft forever
4: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 100
link/none
inet 10.8.0.6/24 brd 10.8.0.255 scope global tun0
valid_lft forever preferred_lft forever
inet6 fe80::48c2:b3cd:5845:5d35/64 scope link flags 800
valid_lft forever preferred_lft forever
NOTE I: "ip_forward" is enabled on Server #2...
echo -n "net.ipv4.ip_forward=1
" >> /etc/sysctl.d/ip_forward.conf
sysctl -w net.ipv4.ip_forward=1
NOTE II: This thread is entirely related to the problem...
Use the LANs of one server to access the LAN of another
With this solution I can make routes without problems...
https://unix.stackexchange.com/a/457347/61742
... but without the benefit of having the thing centralized as when I use dnsmasq.
Thanks! =D
dns dhcp route router dnsmasq
I'm trying to use dnsmasq to pushing routes to my clients on a small local network.
However my clients (Server #1, #2 and #3) can not use these routes. The dnsmasq service is running and I do not know what may be going wrong.
This is the content of my "/etc/dnsmasq.conf" file:
domain-needed
bogus-priv
no-resolv
no-poll
server=/localnet/192.168.56.254
server=8.8.3.3
server=8.8.8.8
server=208.67.220.220
local=/brlightinternet.local/
interface=vboxnet0
listen-address=192.168.56.254
no-hosts
expand-hosts
domain=brlightinternet.local
dhcp-range=192.168.56.3,192.168.56.253,12h
dhcp-option=option:router,192.168.56.254
# pushing routes
dhcp-option=121,10.0.4.0/24,10.0.6.4,10.8.0.0/24,10.0.6.4,10.0.6.0/24,10.8.0.1
dhcp-option=249,10.0.4.0/24,10.0.6.4,10.8.0.0/24,10.0.6.4,10.0.6.0/24,10.8.0.1
dhcp-option=vendor:MSFT,2,1i
cache-size=150
IMPORTANT: "192.168.56.254" is not the ip of the server running dnsmasq. Its ip is "192.168.56.1". From what I understand we can assign a different ip to dnsmasq.
This is the network configuration ("/etc/sysconfig/network-scripts/ifcfg-enp0s17") on each client (Server #1, #2 and #3)...
BOOTPROTO=static
DEVICE=enp0s17
DNS1=192.168.56.254
GATEWAY=192.168.56.254
IPADDR=192.168.56.120
IPV6INIT=NO
NETMASK=255.255.255.0
NM_CONTROLLED=yes
ONBOOT=yes
TYPE=Ethernet
USERCTL=NO
ZONE=public
... only the ips change...
Server #1 -> IPADDR=192.168.56.122
Server #2 -> IPADDR=192.168.56.120
Server #3 -> IPADDR=192.168.56.121
Information about the LANs of each server...
Server #1
[root@localhost ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s17: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:12:26:e2:6c brd ff:ff:ff:ff:ff:ff
inet 192.168.56.122/24 brd 192.168.56.255 scope global noprefixroute enp0s17
valid_lft forever preferred_lft forever
inet6 fe80::a00:12ff:fe26:e26c/64 scope link
valid_lft forever preferred_lft forever
Server #2
[root@localhost ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:2c:d1:58 brd ff:ff:ff:ff:ff:ff
inet 10.0.2.10/24 brd 10.0.2.255 scope global noprefixroute dynamic enp0s8
valid_lft 888sec preferred_lft 888sec
inet6 fe80::2c5c:27aa:2636:8dc9/64 scope link noprefixroute
valid_lft forever preferred_lft forever
3: enp0s17: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:1c:a6:b9:59 brd ff:ff:ff:ff:ff:ff
inet 192.168.56.120/24 brd 192.168.56.255 scope global noprefixroute enp0s17
valid_lft forever preferred_lft forever
inet6 fe80::a00:1cff:fea6:b959/64 scope link
valid_lft forever preferred_lft forever
5: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 100
link/none
inet 10.8.0.1/24 brd 10.8.0.255 scope global tun0
valid_lft forever preferred_lft forever
inet6 fe80::6a67:7379:b64:967c/64 scope link flags 800
valid_lft forever preferred_lft forever
Server #3
[root@localhost ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:71:77:07 brd ff:ff:ff:ff:ff:ff
inet 10.0.4.4/24 brd 10.0.4.255 scope global noprefixroute dynamic enp0s8
valid_lft 1115sec preferred_lft 1115sec
inet6 fe80::899f:8ca4:a7c6:25a7/64 scope link noprefixroute
valid_lft forever preferred_lft forever
3: enp0s17: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:ea:4e:40:ae brd ff:ff:ff:ff:ff:ff
inet 192.168.56.121/24 brd 192.168.56.255 scope global noprefixroute enp0s17
valid_lft forever preferred_lft forever
inet6 fe80::a00:eaff:fe4e:40ae/64 scope link
valid_lft forever preferred_lft forever
4: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 100
link/none
inet 10.8.0.6/24 brd 10.8.0.255 scope global tun0
valid_lft forever preferred_lft forever
inet6 fe80::48c2:b3cd:5845:5d35/64 scope link flags 800
valid_lft forever preferred_lft forever
NOTE I: "ip_forward" is enabled on Server #2...
echo -n "net.ipv4.ip_forward=1
" >> /etc/sysctl.d/ip_forward.conf
sysctl -w net.ipv4.ip_forward=1
NOTE II: This thread is entirely related to the problem...
Use the LANs of one server to access the LAN of another
With this solution I can make routes without problems...
https://unix.stackexchange.com/a/457347/61742
... but without the benefit of having the thing centralized as when I use dnsmasq.
Thanks! =D
dns dhcp route router dnsmasq
dns dhcp route router dnsmasq
edited Dec 24 at 19:47
asked Jul 20 at 23:43
Eduardo Lucio
225114
225114
@galaxy Thread related to configuring dnsmasq as a router: serverfault.com/a/575936/276753
– Eduardo Lucio
Jul 20 at 23:46
@dirkt I think this may interest you!
– Eduardo Lucio
Jul 20 at 23:48
@RuiFRibeiro I think this may interest you!
– Eduardo Lucio
Jul 20 at 23:49
1
I would advise a multi-homed DHCP server ISC-DHCP or Kea. dnsmasq is just suited for home networks/vm dual DNS setups/local DNS cache. We do not get notifications without posting in a thread btw.
– Rui F Ribeiro
Jul 21 at 4:31
1
@RuiFRibeiro In view of your last comment and the explanations of Isaac I will try isc.org/kea (kea), because dnsmasq seems to be very limited even for a very small thing and I am having a bit of trouble finding information about how to use it. Thank you both! =D
– Eduardo Lucio
Jul 23 at 18:21
|
show 3 more comments
@galaxy Thread related to configuring dnsmasq as a router: serverfault.com/a/575936/276753
– Eduardo Lucio
Jul 20 at 23:46
@dirkt I think this may interest you!
– Eduardo Lucio
Jul 20 at 23:48
@RuiFRibeiro I think this may interest you!
– Eduardo Lucio
Jul 20 at 23:49
1
I would advise a multi-homed DHCP server ISC-DHCP or Kea. dnsmasq is just suited for home networks/vm dual DNS setups/local DNS cache. We do not get notifications without posting in a thread btw.
– Rui F Ribeiro
Jul 21 at 4:31
1
@RuiFRibeiro In view of your last comment and the explanations of Isaac I will try isc.org/kea (kea), because dnsmasq seems to be very limited even for a very small thing and I am having a bit of trouble finding information about how to use it. Thank you both! =D
– Eduardo Lucio
Jul 23 at 18:21
@galaxy Thread related to configuring dnsmasq as a router: serverfault.com/a/575936/276753
– Eduardo Lucio
Jul 20 at 23:46
@galaxy Thread related to configuring dnsmasq as a router: serverfault.com/a/575936/276753
– Eduardo Lucio
Jul 20 at 23:46
@dirkt I think this may interest you!
– Eduardo Lucio
Jul 20 at 23:48
@dirkt I think this may interest you!
– Eduardo Lucio
Jul 20 at 23:48
@RuiFRibeiro I think this may interest you!
– Eduardo Lucio
Jul 20 at 23:49
@RuiFRibeiro I think this may interest you!
– Eduardo Lucio
Jul 20 at 23:49
1
1
I would advise a multi-homed DHCP server ISC-DHCP or Kea. dnsmasq is just suited for home networks/vm dual DNS setups/local DNS cache. We do not get notifications without posting in a thread btw.
– Rui F Ribeiro
Jul 21 at 4:31
I would advise a multi-homed DHCP server ISC-DHCP or Kea. dnsmasq is just suited for home networks/vm dual DNS setups/local DNS cache. We do not get notifications without posting in a thread btw.
– Rui F Ribeiro
Jul 21 at 4:31
1
1
@RuiFRibeiro In view of your last comment and the explanations of Isaac I will try isc.org/kea (kea), because dnsmasq seems to be very limited even for a very small thing and I am having a bit of trouble finding information about how to use it. Thank you both! =D
– Eduardo Lucio
Jul 23 at 18:21
@RuiFRibeiro In view of your last comment and the explanations of Isaac I will try isc.org/kea (kea), because dnsmasq seems to be very limited even for a very small thing and I am having a bit of trouble finding information about how to use it. Thank you both! =D
– Eduardo Lucio
Jul 23 at 18:21
|
show 3 more comments
1 Answer
1
active
oldest
votes
AFAICT
Unfortunately providing several dhcp-options to dnsmasq results in the last being applied (not all).
So, you need to supply only two IP addresses (network and gateway):
dhcp-option=121,10.0.4.0/24,10.8.0.1
And, you also need to tell each server[123] to ask for the route.
And, if your ISC DHCP client doesn’t have support for this option (one in current Debian does), you need a line like below in /etc/dhclient.conf
or /etc/dhcp3/dhclient.conf
:
option classless-static-routes code 121 = array of { ip-address, ip-address };
to make dhclient
aware of the 121 option and then use some script in /etc/dhcp3/dhclient-exit-hooks.d/configure_static_routes
to make the network configuration automatic.
This is quite a good description.
@slm Please take a look at this thread: unix.stackexchange.com/q/459945/61742 .
– Eduardo Lucio
Aug 1 at 21:48
I believe that the linked question has been properly answered. If not, please comment. @EduardoLucio
– Isaac
Aug 1 at 22:39
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f457572%2fuse-dnsmasq-to-pushing-routes-to-my-clients-on-a-small-local-network%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
AFAICT
Unfortunately providing several dhcp-options to dnsmasq results in the last being applied (not all).
So, you need to supply only two IP addresses (network and gateway):
dhcp-option=121,10.0.4.0/24,10.8.0.1
And, you also need to tell each server[123] to ask for the route.
And, if your ISC DHCP client doesn’t have support for this option (one in current Debian does), you need a line like below in /etc/dhclient.conf
or /etc/dhcp3/dhclient.conf
:
option classless-static-routes code 121 = array of { ip-address, ip-address };
to make dhclient
aware of the 121 option and then use some script in /etc/dhcp3/dhclient-exit-hooks.d/configure_static_routes
to make the network configuration automatic.
This is quite a good description.
@slm Please take a look at this thread: unix.stackexchange.com/q/459945/61742 .
– Eduardo Lucio
Aug 1 at 21:48
I believe that the linked question has been properly answered. If not, please comment. @EduardoLucio
– Isaac
Aug 1 at 22:39
add a comment |
AFAICT
Unfortunately providing several dhcp-options to dnsmasq results in the last being applied (not all).
So, you need to supply only two IP addresses (network and gateway):
dhcp-option=121,10.0.4.0/24,10.8.0.1
And, you also need to tell each server[123] to ask for the route.
And, if your ISC DHCP client doesn’t have support for this option (one in current Debian does), you need a line like below in /etc/dhclient.conf
or /etc/dhcp3/dhclient.conf
:
option classless-static-routes code 121 = array of { ip-address, ip-address };
to make dhclient
aware of the 121 option and then use some script in /etc/dhcp3/dhclient-exit-hooks.d/configure_static_routes
to make the network configuration automatic.
This is quite a good description.
@slm Please take a look at this thread: unix.stackexchange.com/q/459945/61742 .
– Eduardo Lucio
Aug 1 at 21:48
I believe that the linked question has been properly answered. If not, please comment. @EduardoLucio
– Isaac
Aug 1 at 22:39
add a comment |
AFAICT
Unfortunately providing several dhcp-options to dnsmasq results in the last being applied (not all).
So, you need to supply only two IP addresses (network and gateway):
dhcp-option=121,10.0.4.0/24,10.8.0.1
And, you also need to tell each server[123] to ask for the route.
And, if your ISC DHCP client doesn’t have support for this option (one in current Debian does), you need a line like below in /etc/dhclient.conf
or /etc/dhcp3/dhclient.conf
:
option classless-static-routes code 121 = array of { ip-address, ip-address };
to make dhclient
aware of the 121 option and then use some script in /etc/dhcp3/dhclient-exit-hooks.d/configure_static_routes
to make the network configuration automatic.
This is quite a good description.
AFAICT
Unfortunately providing several dhcp-options to dnsmasq results in the last being applied (not all).
So, you need to supply only two IP addresses (network and gateway):
dhcp-option=121,10.0.4.0/24,10.8.0.1
And, you also need to tell each server[123] to ask for the route.
And, if your ISC DHCP client doesn’t have support for this option (one in current Debian does), you need a line like below in /etc/dhclient.conf
or /etc/dhcp3/dhclient.conf
:
option classless-static-routes code 121 = array of { ip-address, ip-address };
to make dhclient
aware of the 121 option and then use some script in /etc/dhcp3/dhclient-exit-hooks.d/configure_static_routes
to make the network configuration automatic.
This is quite a good description.
edited Dec 18 at 10:49
Community♦
1
1
answered Jul 21 at 0:30
Isaac
11.2k11648
11.2k11648
@slm Please take a look at this thread: unix.stackexchange.com/q/459945/61742 .
– Eduardo Lucio
Aug 1 at 21:48
I believe that the linked question has been properly answered. If not, please comment. @EduardoLucio
– Isaac
Aug 1 at 22:39
add a comment |
@slm Please take a look at this thread: unix.stackexchange.com/q/459945/61742 .
– Eduardo Lucio
Aug 1 at 21:48
I believe that the linked question has been properly answered. If not, please comment. @EduardoLucio
– Isaac
Aug 1 at 22:39
@slm Please take a look at this thread: unix.stackexchange.com/q/459945/61742 .
– Eduardo Lucio
Aug 1 at 21:48
@slm Please take a look at this thread: unix.stackexchange.com/q/459945/61742 .
– Eduardo Lucio
Aug 1 at 21:48
I believe that the linked question has been properly answered. If not, please comment. @EduardoLucio
– Isaac
Aug 1 at 22:39
I believe that the linked question has been properly answered. If not, please comment. @EduardoLucio
– Isaac
Aug 1 at 22:39
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f457572%2fuse-dnsmasq-to-pushing-routes-to-my-clients-on-a-small-local-network%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
@galaxy Thread related to configuring dnsmasq as a router: serverfault.com/a/575936/276753
– Eduardo Lucio
Jul 20 at 23:46
@dirkt I think this may interest you!
– Eduardo Lucio
Jul 20 at 23:48
@RuiFRibeiro I think this may interest you!
– Eduardo Lucio
Jul 20 at 23:49
1
I would advise a multi-homed DHCP server ISC-DHCP or Kea. dnsmasq is just suited for home networks/vm dual DNS setups/local DNS cache. We do not get notifications without posting in a thread btw.
– Rui F Ribeiro
Jul 21 at 4:31
1
@RuiFRibeiro In view of your last comment and the explanations of Isaac I will try isc.org/kea (kea), because dnsmasq seems to be very limited even for a very small thing and I am having a bit of trouble finding information about how to use it. Thank you both! =D
– Eduardo Lucio
Jul 23 at 18:21