setup wireless router using systemd-networkd *.network files

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
3
down vote

favorite
1












I would like to configure an embedded device to behave as a wireless router, and I would like to achieve it preferably using networkd configuration files.



I have two *.network files, a wired WAN interface and a wireless LAN interface, and I would like LAN traffic to be able to access WAN.



# cat /etc/systemd/network/wired.network 
[Match]
Name=eth0

[Network]
DHCP=ipv4
IPForward=yes
IPMasquerade=yes


As is common for wireless routers, the wireless LAN network anso provides DHCP. I used the systemd integrated DHCP server.



# cat /etc/systemd/network/wireless.network
[Match]
Name=wlan0*

[Network]
Description = Wireless IP interface
DHCPServer= yes

[Address]
Address = 192.168.128.1/24
Broadcast = 192.168.128.255

[DHCPServer]
PoolOffset = 10
PoolSize = 40
EmitDNS = yes
DNS = 8.8.8.8, 8.8.4.4
DefaultLeaseTimeSec = 600
MaxLeaseTimeSec = 7200

[Route]


I assume there should be a NAT between the two networks, as is common for wireless routers, but it is not an explicit requirement.



This is as far as I got with my current knowledge, the wired interface connects to WAN properly, and the wireless access point also provides DHCP addresses. But I am unable to access WAN (internet) if I connect to the WiFi AP.



Here is some network interface status:



# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
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: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:26:32:f0:03:21 brd ff:ff:ff:ff:ff:ff
inet 192.168.178.107/24 brd 192.168.178.255 scope global dynamic eth0
valid_lft 4650sec preferred_lft 4650sec
inet6 fe80::226:32ff:fef0:321/64 scope link
valid_lft forever preferred_lft forever
3: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default
link/sit 0.0.0.0 brd 0.0.0.0
4: wlan0wext: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:1d:43:40:0d:04 brd ff:ff:ff:ff:ff:ff
inet 192.168.128.1/24 brd 192.168.128.255 scope global wlan0wext
valid_lft forever preferred_lft forever
inet6 fe80::21d:43ff:fe40:d04/64 scope link
valid_lft forever preferred_lft forever


And route status:



# ip route
default via 192.168.178.1 dev eth0 proto dhcp src 192.168.178.107 metric 1024
192.168.128.0/24 dev wlan0wext proto kernel scope link src 192.168.128.1
192.168.178.0/24 dev eth0 proto kernel scope link src 192.168.178.107
192.168.178.1 dev eth0 proto dhcp scope link src 192.168.178.107 metric 1024

# ip route show table local
broadcast 127.0.0.0 dev lo proto kernel scope link src 127.0.0.1
local 127.0.0.0/8 dev lo proto kernel scope host src 127.0.0.1
local 127.0.0.1 dev lo proto kernel scope host src 127.0.0.1
broadcast 127.255.255.255 dev lo proto kernel scope link src 127.0.0.1
broadcast 192.168.128.0 dev wlan0wext proto kernel scope link src 192.168.128.1
local 192.168.128.1 dev wlan0wext proto kernel scope host src 192.168.128.1
broadcast 192.168.128.255 dev wlan0wext proto kernel scope link src 192.168.128.1
broadcast 192.168.178.0 dev eth0 proto kernel scope link src 192.168.178.107
local 192.168.178.107 dev eth0 proto kernel scope host src 192.168.178.107
broadcast 192.168.178.255 dev eth0 proto kernel scope link src 192.168.178.107


I was not able to find many examples for the [Route] section, and I only have the basic understanding of routing.



Regards,
Iztok Jeras










share|improve this question

























    up vote
    3
    down vote

    favorite
    1












    I would like to configure an embedded device to behave as a wireless router, and I would like to achieve it preferably using networkd configuration files.



    I have two *.network files, a wired WAN interface and a wireless LAN interface, and I would like LAN traffic to be able to access WAN.



    # cat /etc/systemd/network/wired.network 
    [Match]
    Name=eth0

    [Network]
    DHCP=ipv4
    IPForward=yes
    IPMasquerade=yes


    As is common for wireless routers, the wireless LAN network anso provides DHCP. I used the systemd integrated DHCP server.



    # cat /etc/systemd/network/wireless.network
    [Match]
    Name=wlan0*

    [Network]
    Description = Wireless IP interface
    DHCPServer= yes

    [Address]
    Address = 192.168.128.1/24
    Broadcast = 192.168.128.255

    [DHCPServer]
    PoolOffset = 10
    PoolSize = 40
    EmitDNS = yes
    DNS = 8.8.8.8, 8.8.4.4
    DefaultLeaseTimeSec = 600
    MaxLeaseTimeSec = 7200

    [Route]


    I assume there should be a NAT between the two networks, as is common for wireless routers, but it is not an explicit requirement.



    This is as far as I got with my current knowledge, the wired interface connects to WAN properly, and the wireless access point also provides DHCP addresses. But I am unable to access WAN (internet) if I connect to the WiFi AP.



    Here is some network interface status:



    # ip a
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
    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: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:26:32:f0:03:21 brd ff:ff:ff:ff:ff:ff
    inet 192.168.178.107/24 brd 192.168.178.255 scope global dynamic eth0
    valid_lft 4650sec preferred_lft 4650sec
    inet6 fe80::226:32ff:fef0:321/64 scope link
    valid_lft forever preferred_lft forever
    3: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default
    link/sit 0.0.0.0 brd 0.0.0.0
    4: wlan0wext: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:1d:43:40:0d:04 brd ff:ff:ff:ff:ff:ff
    inet 192.168.128.1/24 brd 192.168.128.255 scope global wlan0wext
    valid_lft forever preferred_lft forever
    inet6 fe80::21d:43ff:fe40:d04/64 scope link
    valid_lft forever preferred_lft forever


    And route status:



    # ip route
    default via 192.168.178.1 dev eth0 proto dhcp src 192.168.178.107 metric 1024
    192.168.128.0/24 dev wlan0wext proto kernel scope link src 192.168.128.1
    192.168.178.0/24 dev eth0 proto kernel scope link src 192.168.178.107
    192.168.178.1 dev eth0 proto dhcp scope link src 192.168.178.107 metric 1024

    # ip route show table local
    broadcast 127.0.0.0 dev lo proto kernel scope link src 127.0.0.1
    local 127.0.0.0/8 dev lo proto kernel scope host src 127.0.0.1
    local 127.0.0.1 dev lo proto kernel scope host src 127.0.0.1
    broadcast 127.255.255.255 dev lo proto kernel scope link src 127.0.0.1
    broadcast 192.168.128.0 dev wlan0wext proto kernel scope link src 192.168.128.1
    local 192.168.128.1 dev wlan0wext proto kernel scope host src 192.168.128.1
    broadcast 192.168.128.255 dev wlan0wext proto kernel scope link src 192.168.128.1
    broadcast 192.168.178.0 dev eth0 proto kernel scope link src 192.168.178.107
    local 192.168.178.107 dev eth0 proto kernel scope host src 192.168.178.107
    broadcast 192.168.178.255 dev eth0 proto kernel scope link src 192.168.178.107


    I was not able to find many examples for the [Route] section, and I only have the basic understanding of routing.



    Regards,
    Iztok Jeras










    share|improve this question























      up vote
      3
      down vote

      favorite
      1









      up vote
      3
      down vote

      favorite
      1






      1





      I would like to configure an embedded device to behave as a wireless router, and I would like to achieve it preferably using networkd configuration files.



      I have two *.network files, a wired WAN interface and a wireless LAN interface, and I would like LAN traffic to be able to access WAN.



      # cat /etc/systemd/network/wired.network 
      [Match]
      Name=eth0

      [Network]
      DHCP=ipv4
      IPForward=yes
      IPMasquerade=yes


      As is common for wireless routers, the wireless LAN network anso provides DHCP. I used the systemd integrated DHCP server.



      # cat /etc/systemd/network/wireless.network
      [Match]
      Name=wlan0*

      [Network]
      Description = Wireless IP interface
      DHCPServer= yes

      [Address]
      Address = 192.168.128.1/24
      Broadcast = 192.168.128.255

      [DHCPServer]
      PoolOffset = 10
      PoolSize = 40
      EmitDNS = yes
      DNS = 8.8.8.8, 8.8.4.4
      DefaultLeaseTimeSec = 600
      MaxLeaseTimeSec = 7200

      [Route]


      I assume there should be a NAT between the two networks, as is common for wireless routers, but it is not an explicit requirement.



      This is as far as I got with my current knowledge, the wired interface connects to WAN properly, and the wireless access point also provides DHCP addresses. But I am unable to access WAN (internet) if I connect to the WiFi AP.



      Here is some network interface status:



      # ip a
      1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
      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: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
      link/ether 00:26:32:f0:03:21 brd ff:ff:ff:ff:ff:ff
      inet 192.168.178.107/24 brd 192.168.178.255 scope global dynamic eth0
      valid_lft 4650sec preferred_lft 4650sec
      inet6 fe80::226:32ff:fef0:321/64 scope link
      valid_lft forever preferred_lft forever
      3: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default
      link/sit 0.0.0.0 brd 0.0.0.0
      4: wlan0wext: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
      link/ether 00:1d:43:40:0d:04 brd ff:ff:ff:ff:ff:ff
      inet 192.168.128.1/24 brd 192.168.128.255 scope global wlan0wext
      valid_lft forever preferred_lft forever
      inet6 fe80::21d:43ff:fe40:d04/64 scope link
      valid_lft forever preferred_lft forever


      And route status:



      # ip route
      default via 192.168.178.1 dev eth0 proto dhcp src 192.168.178.107 metric 1024
      192.168.128.0/24 dev wlan0wext proto kernel scope link src 192.168.128.1
      192.168.178.0/24 dev eth0 proto kernel scope link src 192.168.178.107
      192.168.178.1 dev eth0 proto dhcp scope link src 192.168.178.107 metric 1024

      # ip route show table local
      broadcast 127.0.0.0 dev lo proto kernel scope link src 127.0.0.1
      local 127.0.0.0/8 dev lo proto kernel scope host src 127.0.0.1
      local 127.0.0.1 dev lo proto kernel scope host src 127.0.0.1
      broadcast 127.255.255.255 dev lo proto kernel scope link src 127.0.0.1
      broadcast 192.168.128.0 dev wlan0wext proto kernel scope link src 192.168.128.1
      local 192.168.128.1 dev wlan0wext proto kernel scope host src 192.168.128.1
      broadcast 192.168.128.255 dev wlan0wext proto kernel scope link src 192.168.128.1
      broadcast 192.168.178.0 dev eth0 proto kernel scope link src 192.168.178.107
      local 192.168.178.107 dev eth0 proto kernel scope host src 192.168.178.107
      broadcast 192.168.178.255 dev eth0 proto kernel scope link src 192.168.178.107


      I was not able to find many examples for the [Route] section, and I only have the basic understanding of routing.



      Regards,
      Iztok Jeras










      share|improve this question













      I would like to configure an embedded device to behave as a wireless router, and I would like to achieve it preferably using networkd configuration files.



      I have two *.network files, a wired WAN interface and a wireless LAN interface, and I would like LAN traffic to be able to access WAN.



      # cat /etc/systemd/network/wired.network 
      [Match]
      Name=eth0

      [Network]
      DHCP=ipv4
      IPForward=yes
      IPMasquerade=yes


      As is common for wireless routers, the wireless LAN network anso provides DHCP. I used the systemd integrated DHCP server.



      # cat /etc/systemd/network/wireless.network
      [Match]
      Name=wlan0*

      [Network]
      Description = Wireless IP interface
      DHCPServer= yes

      [Address]
      Address = 192.168.128.1/24
      Broadcast = 192.168.128.255

      [DHCPServer]
      PoolOffset = 10
      PoolSize = 40
      EmitDNS = yes
      DNS = 8.8.8.8, 8.8.4.4
      DefaultLeaseTimeSec = 600
      MaxLeaseTimeSec = 7200

      [Route]


      I assume there should be a NAT between the two networks, as is common for wireless routers, but it is not an explicit requirement.



      This is as far as I got with my current knowledge, the wired interface connects to WAN properly, and the wireless access point also provides DHCP addresses. But I am unable to access WAN (internet) if I connect to the WiFi AP.



      Here is some network interface status:



      # ip a
      1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
      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: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
      link/ether 00:26:32:f0:03:21 brd ff:ff:ff:ff:ff:ff
      inet 192.168.178.107/24 brd 192.168.178.255 scope global dynamic eth0
      valid_lft 4650sec preferred_lft 4650sec
      inet6 fe80::226:32ff:fef0:321/64 scope link
      valid_lft forever preferred_lft forever
      3: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default
      link/sit 0.0.0.0 brd 0.0.0.0
      4: wlan0wext: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
      link/ether 00:1d:43:40:0d:04 brd ff:ff:ff:ff:ff:ff
      inet 192.168.128.1/24 brd 192.168.128.255 scope global wlan0wext
      valid_lft forever preferred_lft forever
      inet6 fe80::21d:43ff:fe40:d04/64 scope link
      valid_lft forever preferred_lft forever


      And route status:



      # ip route
      default via 192.168.178.1 dev eth0 proto dhcp src 192.168.178.107 metric 1024
      192.168.128.0/24 dev wlan0wext proto kernel scope link src 192.168.128.1
      192.168.178.0/24 dev eth0 proto kernel scope link src 192.168.178.107
      192.168.178.1 dev eth0 proto dhcp scope link src 192.168.178.107 metric 1024

      # ip route show table local
      broadcast 127.0.0.0 dev lo proto kernel scope link src 127.0.0.1
      local 127.0.0.0/8 dev lo proto kernel scope host src 127.0.0.1
      local 127.0.0.1 dev lo proto kernel scope host src 127.0.0.1
      broadcast 127.255.255.255 dev lo proto kernel scope link src 127.0.0.1
      broadcast 192.168.128.0 dev wlan0wext proto kernel scope link src 192.168.128.1
      local 192.168.128.1 dev wlan0wext proto kernel scope host src 192.168.128.1
      broadcast 192.168.128.255 dev wlan0wext proto kernel scope link src 192.168.128.1
      broadcast 192.168.178.0 dev eth0 proto kernel scope link src 192.168.178.107
      local 192.168.178.107 dev eth0 proto kernel scope host src 192.168.178.107
      broadcast 192.168.178.255 dev eth0 proto kernel scope link src 192.168.178.107


      I was not able to find many examples for the [Route] section, and I only have the basic understanding of routing.



      Regards,
      Iztok Jeras







      wifi router systemd-networkd






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jun 23 '16 at 11:05









      user2963756

      273




      273




















          3 Answers
          3






          active

          oldest

          votes

















          up vote
          0
          down vote













          For RHEL 5 & 6 considering 153.xx is your System IP



          Temporary route add



          ip route add 192.168.10.0/24 via 153.254.92.42 dev eth0



          Permanent route Add



          echo "192.168.10.0/24 via 153.254.92.XX" >> /etc/sysconfig/network-scripts/route-eth1


          For RHEL 7



          Temporary route add



          ip route add 192.168.20.0/29 via 153.254.92.XX dev enp00s0f0



          Permanent route Add



          echo "192.168.10.0/24 via 153.254.92.XX" >> /etc/sysconfig/network-scripts/ifcfg-enp00s0f0





          share|improve this answer





























            up vote
            0
            down vote













            I found with the above .network files that masquerading was missing. The following fixes that:



            iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE


            It appeared that my version of systemd was built without iptables support. Building it again with option 'libiptc' fixes that. I needed to add



            IPForward=yes
            IPMasquerade=yes


            to the wireless.network file as well.






            share|improve this answer








            New contributor




            Ferry Toth is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.
























              up vote
              -2
              down vote













              The issue was not with the route configuration, instead iptables configuration was missing.






              share|improve this answer
















              • 1




                Would you mind sharing what iptables configuration you were missing? As it stands, this is not terribly helpful. Perhaps you could provide an explanation. Thanks.
                – Jonathan Komar
                Mar 17 '17 at 7:50











              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',
              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
              );



              );













               

              draft saved


              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f291604%2fsetup-wireless-router-using-systemd-networkd-network-files%23new-answer', 'question_page');

              );

              Post as a guest






























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              0
              down vote













              For RHEL 5 & 6 considering 153.xx is your System IP



              Temporary route add



              ip route add 192.168.10.0/24 via 153.254.92.42 dev eth0



              Permanent route Add



              echo "192.168.10.0/24 via 153.254.92.XX" >> /etc/sysconfig/network-scripts/route-eth1


              For RHEL 7



              Temporary route add



              ip route add 192.168.20.0/29 via 153.254.92.XX dev enp00s0f0



              Permanent route Add



              echo "192.168.10.0/24 via 153.254.92.XX" >> /etc/sysconfig/network-scripts/ifcfg-enp00s0f0





              share|improve this answer


























                up vote
                0
                down vote













                For RHEL 5 & 6 considering 153.xx is your System IP



                Temporary route add



                ip route add 192.168.10.0/24 via 153.254.92.42 dev eth0



                Permanent route Add



                echo "192.168.10.0/24 via 153.254.92.XX" >> /etc/sysconfig/network-scripts/route-eth1


                For RHEL 7



                Temporary route add



                ip route add 192.168.20.0/29 via 153.254.92.XX dev enp00s0f0



                Permanent route Add



                echo "192.168.10.0/24 via 153.254.92.XX" >> /etc/sysconfig/network-scripts/ifcfg-enp00s0f0





                share|improve this answer
























                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  For RHEL 5 & 6 considering 153.xx is your System IP



                  Temporary route add



                  ip route add 192.168.10.0/24 via 153.254.92.42 dev eth0



                  Permanent route Add



                  echo "192.168.10.0/24 via 153.254.92.XX" >> /etc/sysconfig/network-scripts/route-eth1


                  For RHEL 7



                  Temporary route add



                  ip route add 192.168.20.0/29 via 153.254.92.XX dev enp00s0f0



                  Permanent route Add



                  echo "192.168.10.0/24 via 153.254.92.XX" >> /etc/sysconfig/network-scripts/ifcfg-enp00s0f0





                  share|improve this answer














                  For RHEL 5 & 6 considering 153.xx is your System IP



                  Temporary route add



                  ip route add 192.168.10.0/24 via 153.254.92.42 dev eth0



                  Permanent route Add



                  echo "192.168.10.0/24 via 153.254.92.XX" >> /etc/sysconfig/network-scripts/route-eth1


                  For RHEL 7



                  Temporary route add



                  ip route add 192.168.20.0/29 via 153.254.92.XX dev enp00s0f0



                  Permanent route Add



                  echo "192.168.10.0/24 via 153.254.92.XX" >> /etc/sysconfig/network-scripts/ifcfg-enp00s0f0






                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Jun 23 '16 at 11:32

























                  answered Jun 23 '16 at 11:21









                  Mongrel

                  2,04131344




                  2,04131344






















                      up vote
                      0
                      down vote













                      I found with the above .network files that masquerading was missing. The following fixes that:



                      iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE


                      It appeared that my version of systemd was built without iptables support. Building it again with option 'libiptc' fixes that. I needed to add



                      IPForward=yes
                      IPMasquerade=yes


                      to the wireless.network file as well.






                      share|improve this answer








                      New contributor




                      Ferry Toth is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.





















                        up vote
                        0
                        down vote













                        I found with the above .network files that masquerading was missing. The following fixes that:



                        iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE


                        It appeared that my version of systemd was built without iptables support. Building it again with option 'libiptc' fixes that. I needed to add



                        IPForward=yes
                        IPMasquerade=yes


                        to the wireless.network file as well.






                        share|improve this answer








                        New contributor




                        Ferry Toth is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                        Check out our Code of Conduct.



















                          up vote
                          0
                          down vote










                          up vote
                          0
                          down vote









                          I found with the above .network files that masquerading was missing. The following fixes that:



                          iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE


                          It appeared that my version of systemd was built without iptables support. Building it again with option 'libiptc' fixes that. I needed to add



                          IPForward=yes
                          IPMasquerade=yes


                          to the wireless.network file as well.






                          share|improve this answer








                          New contributor




                          Ferry Toth is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.









                          I found with the above .network files that masquerading was missing. The following fixes that:



                          iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE


                          It appeared that my version of systemd was built without iptables support. Building it again with option 'libiptc' fixes that. I needed to add



                          IPForward=yes
                          IPMasquerade=yes


                          to the wireless.network file as well.







                          share|improve this answer








                          New contributor




                          Ferry Toth is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.









                          share|improve this answer



                          share|improve this answer






                          New contributor




                          Ferry Toth is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.









                          answered 1 hour ago









                          Ferry Toth

                          1




                          1




                          New contributor




                          Ferry Toth is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.





                          New contributor





                          Ferry Toth is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.






                          Ferry Toth is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.




















                              up vote
                              -2
                              down vote













                              The issue was not with the route configuration, instead iptables configuration was missing.






                              share|improve this answer
















                              • 1




                                Would you mind sharing what iptables configuration you were missing? As it stands, this is not terribly helpful. Perhaps you could provide an explanation. Thanks.
                                – Jonathan Komar
                                Mar 17 '17 at 7:50















                              up vote
                              -2
                              down vote













                              The issue was not with the route configuration, instead iptables configuration was missing.






                              share|improve this answer
















                              • 1




                                Would you mind sharing what iptables configuration you were missing? As it stands, this is not terribly helpful. Perhaps you could provide an explanation. Thanks.
                                – Jonathan Komar
                                Mar 17 '17 at 7:50













                              up vote
                              -2
                              down vote










                              up vote
                              -2
                              down vote









                              The issue was not with the route configuration, instead iptables configuration was missing.






                              share|improve this answer












                              The issue was not with the route configuration, instead iptables configuration was missing.







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Jun 23 '16 at 14:51









                              user2963756

                              273




                              273







                              • 1




                                Would you mind sharing what iptables configuration you were missing? As it stands, this is not terribly helpful. Perhaps you could provide an explanation. Thanks.
                                – Jonathan Komar
                                Mar 17 '17 at 7:50













                              • 1




                                Would you mind sharing what iptables configuration you were missing? As it stands, this is not terribly helpful. Perhaps you could provide an explanation. Thanks.
                                – Jonathan Komar
                                Mar 17 '17 at 7:50








                              1




                              1




                              Would you mind sharing what iptables configuration you were missing? As it stands, this is not terribly helpful. Perhaps you could provide an explanation. Thanks.
                              – Jonathan Komar
                              Mar 17 '17 at 7:50





                              Would you mind sharing what iptables configuration you were missing? As it stands, this is not terribly helpful. Perhaps you could provide an explanation. Thanks.
                              – Jonathan Komar
                              Mar 17 '17 at 7:50


















                               

                              draft saved


                              draft discarded















































                               


                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f291604%2fsetup-wireless-router-using-systemd-networkd-network-files%23new-answer', 'question_page');

                              );

                              Post as a guest













































































                              Popular posts from this blog

                              How to check contact read email or not when send email to Individual?

                              Bahrain

                              Postfix configuration issue with fips on centos 7; mailgun relay