Anonymous
Not logged in
Talk
Contributions
Create account
Log in
LinuxizeNet
Search
Editing
Linux router with WAN, LAN and DMZ
(section)
From LinuxizeNet
Namespaces
Page
Discussion
More
More
Page actions
Read
Edit
History
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Interfaces with systemd-networkd == One file per interface in <code>/etc/systemd/network/</code>. The numeric prefix only controls the order the files are read. WAN β <code>/etc/systemd/network/10-wan.network</code>: <syntaxhighlight lang="ini"> [Match] Name=eth0 [Network] DHCP=ipv4 # Static instead? Drop DHCP= and use: # Address=203.0.113.10/24 # Gateway=203.0.113.1 # DNS=1.1.1.1 [DHCPv4] UseDNS=yes UseNTP=yes </syntaxhighlight> LAN β <code>/etc/systemd/network/20-lan.network</code>: <syntaxhighlight lang="ini"> [Match] Name=eth1 [Network] Address=10.0.1.1/24 ConfigureWithoutCarrier=yes </syntaxhighlight> DMZ β <code>/etc/systemd/network/30-dmz.network</code>: <syntaxhighlight lang="ini"> [Match] Name=eth2 [Network] Address=10.0.0.1/24 ConfigureWithoutCarrier=yes </syntaxhighlight> Apply and inspect: <syntaxhighlight lang="bash"> systemctl enable --now systemd-networkd networkctl reload networkctl status eth1 </syntaxhighlight> Handing out addresses on the LAN is a separate job β see [[DHCP and NTP for the LAN with systemd-networkd]].
Summary:
Please note that all contributions to LinuxizeNet may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
LinuxizeNet:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Wiki tools
Wiki tools
Special pages
Page tools
Page tools
User page tools
More
What links here
Related changes
Page information
Page logs