Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.networking > #4163

Re: Separate two network bridges on linux

From Tauno Voipio <tauno.voipio@notused.fi.invalid>
Newsgroups comp.os.linux.networking
Subject Re: Separate two network bridges on linux
Date 2018-06-23 20:18 +0300
Organization A noiseless patient Spider
Message-ID <pglvct$mk6$1@dont-email.me> (permalink)
References <878t77c331.fsf@gmx.de> <slrnpinvil.31ka.grahn+nntp@frailea.sa.invalid> <jwvvaabbmyj.fsf-monnier+comp.os.linux.networking@gnu.org> <slrnpip3ol.31ka.grahn+nntp@frailea.sa.invalid> <pgjjik$p6$1@tncsrv09.home.tnetconsulting.net>

Show all headers | View raw


On 22.6.18 22:40, Grant Taylor wrote:
> 
>> I still don't get the talk about dnsmasq and special DHCP setups 
>> though. Either setup above should need just the usual services on the 
>> router:
>>
>> - DHCP (and IPv6 router advertisement) for two networks
>> - NAT
>> - DNS and possibly NTP
> 
> I do not recall seeing the talk about dnsmasq (which is a DNS and DHCP 
> server) or special DHCP setups.  So I can't comment on that.
> 

Here you are: dnsmasq.conf for a raspberry Pi running OpenVPN,
firewall, dnsmasq and NTP. To split the only Ethernet port to
outside and inside networks, a virtual LAN switch (3C17300)
is used, and the connection to the inside network is on vlan1.

The virtual private network by OpenVPn is on tun0.

Dnsmasq provides DNS cache and service from /etc/hosts, and
DHCP (could also provide BOOTP/TFTP booting, details dropped).
The local computer names (bigmac etc.) are taken from /ect/hosts.

NTP is handled by a separate daemon. The DHCP server directs
NTP questions from clients to the local NTP server.

NAT is taken care of by iptables.

--- clip clip ---

#	/etc/dnsmasq.conf for raspberry
#

# Never forward addresses in the non-routed address spaces.

bogus-priv

# Add local-only domains here, queries in these domains are answered
# from /etc/hosts or DHCP only.

local=/localdomain/
local=/openvpn/

# If you want dnsmasq to listen for DHCP and DNS requests only on
# specified interfaces (and the loopback) give the name of the
# interface (eg eth0) here.
# Repeat the line for more than one interface.

interface=vlan1
interface=tun0

# Set this (and domain: see below) if you want to have a domain
# automatically added to simple names in a hosts-file.

expand-hosts

# Uncomment this to enable the integrated DHCP server, you need
# to supply the range of addresses available for lease and optionally
# a lease time. If you have more than one network, you will need to
# repeat this for each network on which you want to supply DHCP
# service.

dhcp-range=192.168.42.16,192.168.42.22,2h

# Supply parameters for specified hosts using DHCP. There are lots
# of valid alternatives, so we will give examples of each. Note that
# IP addresses DO NOT have to be in the range given above, they just
# need to be on the same network. The order of the parameters in these
# do not matter, it's permissble to give name,adddress and MAC in any order

dhcp-host=00:20:18:80:f1:5e,greg,12h
dhcp-host=00:a0:24:43:89:2d,dustpuppy,12h
dhcp-host=00:23:32:2e:a7:e4,00:23:32:2e:a7:e5,bigmac,12h
dhcp-host=00:23:32:c8:9b:40,macbook,12h
dhcp-host=b8:27:eb:d3:4b:a1,pi2,12h
dhcp-host=08:00:20:78:6b:05,erwin,12h

# Set DNS server to clients from dnsmasq

dhcp-option=6,0.0.0.0

# Set the NTP time server address to be the same machine as
# is running dnsmasq

dhcp-option=42,0.0.0.0

# If you want dnsmasq to detect attempts by Verisign to send queries
# to unregistered .com and .net hosts to its sitefinder service and
# have dnsmasq instead return the correct NXDOMAIN response, uncomment
# this line. You can add similar lines to do the same for other
# registries which have implemented wildcard A records.

bogus-nxdomain=64.94.110.11

---clip clip ---

-- 

-TV

Back to comp.os.linux.networking | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Separate two network bridges on linux Kevin Osthoff <icepic1984@gmx.de> - 2018-06-21 22:11 +0200
  Re: Separate two network bridges on linux Grant Taylor <gtaylor@tnetconsulting.net> - 2018-06-21 12:30 -0600
    Re: Separate two network bridges on linux Kevin Osthoff <icepic1984@gmx.de> - 2018-06-21 23:52 +0200
      Re: Separate two network bridges on linux Grant Taylor <gtaylor@tnetconsulting.net> - 2018-06-21 16:37 -0600
      Re: Separate two network bridges on linux Pascal Hambourg <pascal@plouf.fr.eu.org> - 2018-06-22 21:27 +0200
        Re: Separate two network bridges on linux Kevin Osthoff <icepic1984@gmx.de> - 2018-06-23 00:16 +0200
  Re: Separate two network bridges on linux Jorgen Grahn <grahn+nntp@snipabacken.se> - 2018-06-21 19:36 +0000
    Re: Separate two network bridges on linux Kevin Osthoff <icepic1984@gmx.de> - 2018-06-21 23:59 +0200
      Re: Separate two network bridges on linux Jorgen Grahn <grahn+nntp@snipabacken.se> - 2018-06-21 20:39 +0000
      Re: Separate two network bridges on linux Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2018-06-22 11:14 +0300
        Re: Separate two network bridges on linux Kevin Osthoff <icepic1984@gmx.de> - 2018-06-22 20:18 +0200
          Re: Separate two network bridges on linux Grant Taylor <gtaylor@tnetconsulting.net> - 2018-06-22 12:35 -0600
            Re: Separate two network bridges on linux Kevin Osthoff <icepic1984@gmx.de> - 2018-06-23 00:10 +0200
              Re: Separate two network bridges on linux Grant Taylor <gtaylor@tnetconsulting.net> - 2018-06-22 14:36 -0600
                Re: Separate two network bridges on linux Richard Kettlewell <invalid@invalid.invalid> - 2018-06-22 22:23 +0100
                Re: Separate two network bridges on linux Grant Taylor <gtaylor@tnetconsulting.net> - 2018-06-22 15:37 -0600
              Re: Separate two network bridges on linux Grant Taylor <gtaylor@tnetconsulting.net> - 2018-06-22 15:46 -0600
              Re: Separate two network bridges on linux Jorgen Grahn <grahn+nntp@snipabacken.se> - 2018-06-22 22:45 +0000
                Re: Separate two network bridges on linux Grant Taylor <gtaylor@tnetconsulting.net> - 2018-06-22 17:38 -0600
    Re: Separate two network bridges on linux Grant Taylor <gtaylor@tnetconsulting.net> - 2018-06-21 16:40 -0600
      Re: Separate two network bridges on linux Jorgen Grahn <grahn+nntp@snipabacken.se> - 2018-06-22 05:38 +0000
    Re: Separate two network bridges on linux Stefan Monnier <monnier@iro.umontreal.ca> - 2018-06-21 22:01 -0400
      Re: Separate two network bridges on linux Jorgen Grahn <grahn+nntp@snipabacken.se> - 2018-06-22 05:54 +0000
        Re: Separate two network bridges on linux Grant Taylor <gtaylor@tnetconsulting.net> - 2018-06-22 13:40 -0600
          Re: Separate two network bridges on linux Jorgen Grahn <grahn+nntp@snipabacken.se> - 2018-06-23 06:36 +0000
          Re: Separate two network bridges on linux Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2018-06-23 20:18 +0300

csiph-web