Create an access point to 'bridge' between two wireless connections. How should /etc/network/interfaces look?

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





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
1
down vote

favorite












I'm following this guide: Setting up a Raspberry Pi as an access point in a standalone network (NAT) to create an access point. The only difference is that I'm using another wifi connection where the ethernet connection would be, so I just changed eth0 by wlan1 in the entire tutorial, because wlan1 is my USB dongle which is connect to my router.



However, there's nothing being said about the /etc/network/interfaces file. Here's mine:



auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
#wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

auto wlan1
allow-hotplug wlan1
iface wlan1 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf


I can see the SSID and connect to it, but it keeps obtaining IP address forever. I think it has something to do with /etc/network/interfaces. Take a look at my ifconfig:



pi@raspberrypi:~ $ ifconfig 
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 4 bytes 156 (156.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 4 bytes 156 (156.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.25.6 netmask 255.255.255.0 broadcast 192.168.25.255
inet6 fe80::ba27:ebff:feaa:1f8 prefixlen 64 scopeid 0x20<link>
ether b8:27:eb:aa:01:f8 txqueuelen 1000 (Ethernet)
RX packets 42 bytes 5757 (5.6 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 37 bytes 5838 (5.7 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlan1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.25.6 netmask 255.255.255.0 broadcast 192.168.25.255
inet6 2804:7f0:e181:b678:2e0:4dff:fe06:4f8 prefixlen 64 scopeid 0x0<global>
inet6 fe80::2e0:4dff:fe06:4f8 prefixlen 64 scopeid 0x20<link>
ether 00:e0:4d:06:04:f8 txqueuelen 1000 (Ethernet)
RX packets 86 bytes 11978 (11.6 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 86 bytes 15855 (15.4 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0


How can wlan0 have IP 192.168.25.6? This is the IP given by the router in which wlan1 connects.



How should I edit wlan0 configurations? I've been trying lots of static configurations but when I do anything different that what's on screen, the onboard wifi interface vanishes and then the USB dongle takes the place of wlan0.



Also, is there a way to guarantee that the usb dongle will always get wlan1 and the onboard wifi wlan0? It seems arbitrary.



UPDATE



● dhcpcd.service - dhcpcd on all interfaces
Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/dhcpcd.service.d
└─wait.conf
Active: failed (Result: exit-code) since Sun 2018-08-05 04:54:32 UTC; 7s ago
Process: 853 ExecStart=/usr/lib/dhcpcd5/dhcpcd -q -w (code=exited, status=6)

Aug 05 04:54:32 raspberrypi systemd[1]: Starting dhcpcd on all interfaces...
Aug 05 04:54:32 raspberrypi dhcpcd[853]: Not running dhcpcd because /etc/network/interfaces
Aug 05 04:54:32 raspberrypi dhcpcd[853]: defines some interfaces that will use a
Aug 05 04:54:32 raspberrypi dhcpcd[853]: DHCP client or static address
Aug 05 04:54:32 raspberrypi systemd[1]: dhcpcd.service: Control process exited, code=exited status=6
Aug 05 04:54:32 raspberrypi systemd[1]: Failed to start dhcpcd on all interfaces.
Aug 05 04:54:32 raspberrypi systemd[1]: dhcpcd.service: Unit entered failed state.
Aug 05 04:54:32 raspberrypi systemd[1]: dhcpcd.service: Failed with result 'exit-code'.






share|improve this question



























    up vote
    1
    down vote

    favorite












    I'm following this guide: Setting up a Raspberry Pi as an access point in a standalone network (NAT) to create an access point. The only difference is that I'm using another wifi connection where the ethernet connection would be, so I just changed eth0 by wlan1 in the entire tutorial, because wlan1 is my USB dongle which is connect to my router.



    However, there's nothing being said about the /etc/network/interfaces file. Here's mine:



    auto wlan0
    allow-hotplug wlan0
    iface wlan0 inet dhcp
    #wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

    auto wlan1
    allow-hotplug wlan1
    iface wlan1 inet dhcp
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf


    I can see the SSID and connect to it, but it keeps obtaining IP address forever. I think it has something to do with /etc/network/interfaces. Take a look at my ifconfig:



    pi@raspberrypi:~ $ ifconfig 
    lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
    inet 127.0.0.1 netmask 255.0.0.0
    inet6 ::1 prefixlen 128 scopeid 0x10<host>
    loop txqueuelen 1000 (Local Loopback)
    RX packets 4 bytes 156 (156.0 B)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 4 bytes 156 (156.0 B)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

    wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
    inet 192.168.25.6 netmask 255.255.255.0 broadcast 192.168.25.255
    inet6 fe80::ba27:ebff:feaa:1f8 prefixlen 64 scopeid 0x20<link>
    ether b8:27:eb:aa:01:f8 txqueuelen 1000 (Ethernet)
    RX packets 42 bytes 5757 (5.6 KiB)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 37 bytes 5838 (5.7 KiB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

    wlan1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
    inet 192.168.25.6 netmask 255.255.255.0 broadcast 192.168.25.255
    inet6 2804:7f0:e181:b678:2e0:4dff:fe06:4f8 prefixlen 64 scopeid 0x0<global>
    inet6 fe80::2e0:4dff:fe06:4f8 prefixlen 64 scopeid 0x20<link>
    ether 00:e0:4d:06:04:f8 txqueuelen 1000 (Ethernet)
    RX packets 86 bytes 11978 (11.6 KiB)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 86 bytes 15855 (15.4 KiB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0


    How can wlan0 have IP 192.168.25.6? This is the IP given by the router in which wlan1 connects.



    How should I edit wlan0 configurations? I've been trying lots of static configurations but when I do anything different that what's on screen, the onboard wifi interface vanishes and then the USB dongle takes the place of wlan0.



    Also, is there a way to guarantee that the usb dongle will always get wlan1 and the onboard wifi wlan0? It seems arbitrary.



    UPDATE



    ● dhcpcd.service - dhcpcd on all interfaces
    Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled; vendor preset: enabled)
    Drop-In: /etc/systemd/system/dhcpcd.service.d
    └─wait.conf
    Active: failed (Result: exit-code) since Sun 2018-08-05 04:54:32 UTC; 7s ago
    Process: 853 ExecStart=/usr/lib/dhcpcd5/dhcpcd -q -w (code=exited, status=6)

    Aug 05 04:54:32 raspberrypi systemd[1]: Starting dhcpcd on all interfaces...
    Aug 05 04:54:32 raspberrypi dhcpcd[853]: Not running dhcpcd because /etc/network/interfaces
    Aug 05 04:54:32 raspberrypi dhcpcd[853]: defines some interfaces that will use a
    Aug 05 04:54:32 raspberrypi dhcpcd[853]: DHCP client or static address
    Aug 05 04:54:32 raspberrypi systemd[1]: dhcpcd.service: Control process exited, code=exited status=6
    Aug 05 04:54:32 raspberrypi systemd[1]: Failed to start dhcpcd on all interfaces.
    Aug 05 04:54:32 raspberrypi systemd[1]: dhcpcd.service: Unit entered failed state.
    Aug 05 04:54:32 raspberrypi systemd[1]: dhcpcd.service: Failed with result 'exit-code'.






    share|improve this question























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I'm following this guide: Setting up a Raspberry Pi as an access point in a standalone network (NAT) to create an access point. The only difference is that I'm using another wifi connection where the ethernet connection would be, so I just changed eth0 by wlan1 in the entire tutorial, because wlan1 is my USB dongle which is connect to my router.



      However, there's nothing being said about the /etc/network/interfaces file. Here's mine:



      auto wlan0
      allow-hotplug wlan0
      iface wlan0 inet dhcp
      #wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

      auto wlan1
      allow-hotplug wlan1
      iface wlan1 inet dhcp
      wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf


      I can see the SSID and connect to it, but it keeps obtaining IP address forever. I think it has something to do with /etc/network/interfaces. Take a look at my ifconfig:



      pi@raspberrypi:~ $ ifconfig 
      lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
      inet 127.0.0.1 netmask 255.0.0.0
      inet6 ::1 prefixlen 128 scopeid 0x10<host>
      loop txqueuelen 1000 (Local Loopback)
      RX packets 4 bytes 156 (156.0 B)
      RX errors 0 dropped 0 overruns 0 frame 0
      TX packets 4 bytes 156 (156.0 B)
      TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

      wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
      inet 192.168.25.6 netmask 255.255.255.0 broadcast 192.168.25.255
      inet6 fe80::ba27:ebff:feaa:1f8 prefixlen 64 scopeid 0x20<link>
      ether b8:27:eb:aa:01:f8 txqueuelen 1000 (Ethernet)
      RX packets 42 bytes 5757 (5.6 KiB)
      RX errors 0 dropped 0 overruns 0 frame 0
      TX packets 37 bytes 5838 (5.7 KiB)
      TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

      wlan1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
      inet 192.168.25.6 netmask 255.255.255.0 broadcast 192.168.25.255
      inet6 2804:7f0:e181:b678:2e0:4dff:fe06:4f8 prefixlen 64 scopeid 0x0<global>
      inet6 fe80::2e0:4dff:fe06:4f8 prefixlen 64 scopeid 0x20<link>
      ether 00:e0:4d:06:04:f8 txqueuelen 1000 (Ethernet)
      RX packets 86 bytes 11978 (11.6 KiB)
      RX errors 0 dropped 0 overruns 0 frame 0
      TX packets 86 bytes 15855 (15.4 KiB)
      TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0


      How can wlan0 have IP 192.168.25.6? This is the IP given by the router in which wlan1 connects.



      How should I edit wlan0 configurations? I've been trying lots of static configurations but when I do anything different that what's on screen, the onboard wifi interface vanishes and then the USB dongle takes the place of wlan0.



      Also, is there a way to guarantee that the usb dongle will always get wlan1 and the onboard wifi wlan0? It seems arbitrary.



      UPDATE



      ● dhcpcd.service - dhcpcd on all interfaces
      Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled; vendor preset: enabled)
      Drop-In: /etc/systemd/system/dhcpcd.service.d
      └─wait.conf
      Active: failed (Result: exit-code) since Sun 2018-08-05 04:54:32 UTC; 7s ago
      Process: 853 ExecStart=/usr/lib/dhcpcd5/dhcpcd -q -w (code=exited, status=6)

      Aug 05 04:54:32 raspberrypi systemd[1]: Starting dhcpcd on all interfaces...
      Aug 05 04:54:32 raspberrypi dhcpcd[853]: Not running dhcpcd because /etc/network/interfaces
      Aug 05 04:54:32 raspberrypi dhcpcd[853]: defines some interfaces that will use a
      Aug 05 04:54:32 raspberrypi dhcpcd[853]: DHCP client or static address
      Aug 05 04:54:32 raspberrypi systemd[1]: dhcpcd.service: Control process exited, code=exited status=6
      Aug 05 04:54:32 raspberrypi systemd[1]: Failed to start dhcpcd on all interfaces.
      Aug 05 04:54:32 raspberrypi systemd[1]: dhcpcd.service: Unit entered failed state.
      Aug 05 04:54:32 raspberrypi systemd[1]: dhcpcd.service: Failed with result 'exit-code'.






      share|improve this question













      I'm following this guide: Setting up a Raspberry Pi as an access point in a standalone network (NAT) to create an access point. The only difference is that I'm using another wifi connection where the ethernet connection would be, so I just changed eth0 by wlan1 in the entire tutorial, because wlan1 is my USB dongle which is connect to my router.



      However, there's nothing being said about the /etc/network/interfaces file. Here's mine:



      auto wlan0
      allow-hotplug wlan0
      iface wlan0 inet dhcp
      #wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

      auto wlan1
      allow-hotplug wlan1
      iface wlan1 inet dhcp
      wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf


      I can see the SSID and connect to it, but it keeps obtaining IP address forever. I think it has something to do with /etc/network/interfaces. Take a look at my ifconfig:



      pi@raspberrypi:~ $ ifconfig 
      lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
      inet 127.0.0.1 netmask 255.0.0.0
      inet6 ::1 prefixlen 128 scopeid 0x10<host>
      loop txqueuelen 1000 (Local Loopback)
      RX packets 4 bytes 156 (156.0 B)
      RX errors 0 dropped 0 overruns 0 frame 0
      TX packets 4 bytes 156 (156.0 B)
      TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

      wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
      inet 192.168.25.6 netmask 255.255.255.0 broadcast 192.168.25.255
      inet6 fe80::ba27:ebff:feaa:1f8 prefixlen 64 scopeid 0x20<link>
      ether b8:27:eb:aa:01:f8 txqueuelen 1000 (Ethernet)
      RX packets 42 bytes 5757 (5.6 KiB)
      RX errors 0 dropped 0 overruns 0 frame 0
      TX packets 37 bytes 5838 (5.7 KiB)
      TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

      wlan1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
      inet 192.168.25.6 netmask 255.255.255.0 broadcast 192.168.25.255
      inet6 2804:7f0:e181:b678:2e0:4dff:fe06:4f8 prefixlen 64 scopeid 0x0<global>
      inet6 fe80::2e0:4dff:fe06:4f8 prefixlen 64 scopeid 0x20<link>
      ether 00:e0:4d:06:04:f8 txqueuelen 1000 (Ethernet)
      RX packets 86 bytes 11978 (11.6 KiB)
      RX errors 0 dropped 0 overruns 0 frame 0
      TX packets 86 bytes 15855 (15.4 KiB)
      TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0


      How can wlan0 have IP 192.168.25.6? This is the IP given by the router in which wlan1 connects.



      How should I edit wlan0 configurations? I've been trying lots of static configurations but when I do anything different that what's on screen, the onboard wifi interface vanishes and then the USB dongle takes the place of wlan0.



      Also, is there a way to guarantee that the usb dongle will always get wlan1 and the onboard wifi wlan0? It seems arbitrary.



      UPDATE



      ● dhcpcd.service - dhcpcd on all interfaces
      Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled; vendor preset: enabled)
      Drop-In: /etc/systemd/system/dhcpcd.service.d
      └─wait.conf
      Active: failed (Result: exit-code) since Sun 2018-08-05 04:54:32 UTC; 7s ago
      Process: 853 ExecStart=/usr/lib/dhcpcd5/dhcpcd -q -w (code=exited, status=6)

      Aug 05 04:54:32 raspberrypi systemd[1]: Starting dhcpcd on all interfaces...
      Aug 05 04:54:32 raspberrypi dhcpcd[853]: Not running dhcpcd because /etc/network/interfaces
      Aug 05 04:54:32 raspberrypi dhcpcd[853]: defines some interfaces that will use a
      Aug 05 04:54:32 raspberrypi dhcpcd[853]: DHCP client or static address
      Aug 05 04:54:32 raspberrypi systemd[1]: dhcpcd.service: Control process exited, code=exited status=6
      Aug 05 04:54:32 raspberrypi systemd[1]: Failed to start dhcpcd on all interfaces.
      Aug 05 04:54:32 raspberrypi systemd[1]: dhcpcd.service: Unit entered failed state.
      Aug 05 04:54:32 raspberrypi systemd[1]: dhcpcd.service: Failed with result 'exit-code'.








      share|improve this question












      share|improve this question




      share|improve this question








      edited yesterday









      slm♦

      232k65479648




      232k65479648









      asked yesterday









      Guerlando OCs

      1067




      1067




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          If wlan0 is going to be the access point (AP), then you shouldn't attempt to use it as a client (station, STA). But this is what



          auto wlan0
          allow-hotplug wlan0
          iface wlan0 inet dhcp
          #wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf


          says: "Please use wlan0 as in client-mode, and get an IP address for it using DHCP". Instead, you want something like



          auto wlan0
          iface wlan0 inet static
          address 10.0.0.1
          netmask 255.255.255.0
          broadcast 10.0.0.255


          Replace 10.0.0.* and netmask with the IP range you want to have for your AP.






          share|improve this answer





















          • but in the tutorial I followed, it uses dhcpcd to configure wlan0. Shouldn't this configurations be overwritten?
            – Guerlando OCs
            yesterday










          • In the tutorial you followed, dhcpcd gave it a static address. It doesn't really matter who gives the interface the static address; if it gets one with dhcpcd, that's also fine. However, you wrote in the question that it gets 192.168.25.6, which suggests the dhcpcd method doesn't work (for whatever reason). Now you can either fix dhcpcd, or just give it the gorram static address in the first place.
            – dirkt
            yesterday










          • I tried your method and it worked, but I can't use internet, maybe a problem with routing. The dhcpd error is in the post. Do you have an idea of why it happens? It says that the error is due to /etc/network/interfaces
            – Guerlando OCs
            yesterday










          • I am not very familiar with dhcpcd (I use dhclient), but apparently it wants to control everything and doesn't like it if anyone else gives out static addresses, so if refuses to run. Which is also why you can't use internet. So I guess you'll have to change /etc/network/interfaces back and figure out how to make dhcpcd behave, and give out the correct static address. At least that narrows down the problem to the dhcpcd-configuration...
            – dirkt
            yesterday






          • 1




            I specified that it should control only wlan0 but that's ok, I simply disabled it. I'm now having a problem that the wireless disappears after some time. That is. my SSID won't show up anymore. I created another question because this is a completely different problem, maybe you can help? unix.stackexchange.com/questions/460681/… anyways, I'm gonna accept your solution because it worked
            – Guerlando OCs
            yesterday










          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: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          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%2f460587%2fcreate-an-access-point-to-bridge-between-two-wireless-connections-how-should%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          1
          down vote



          accepted










          If wlan0 is going to be the access point (AP), then you shouldn't attempt to use it as a client (station, STA). But this is what



          auto wlan0
          allow-hotplug wlan0
          iface wlan0 inet dhcp
          #wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf


          says: "Please use wlan0 as in client-mode, and get an IP address for it using DHCP". Instead, you want something like



          auto wlan0
          iface wlan0 inet static
          address 10.0.0.1
          netmask 255.255.255.0
          broadcast 10.0.0.255


          Replace 10.0.0.* and netmask with the IP range you want to have for your AP.






          share|improve this answer





















          • but in the tutorial I followed, it uses dhcpcd to configure wlan0. Shouldn't this configurations be overwritten?
            – Guerlando OCs
            yesterday










          • In the tutorial you followed, dhcpcd gave it a static address. It doesn't really matter who gives the interface the static address; if it gets one with dhcpcd, that's also fine. However, you wrote in the question that it gets 192.168.25.6, which suggests the dhcpcd method doesn't work (for whatever reason). Now you can either fix dhcpcd, or just give it the gorram static address in the first place.
            – dirkt
            yesterday










          • I tried your method and it worked, but I can't use internet, maybe a problem with routing. The dhcpd error is in the post. Do you have an idea of why it happens? It says that the error is due to /etc/network/interfaces
            – Guerlando OCs
            yesterday










          • I am not very familiar with dhcpcd (I use dhclient), but apparently it wants to control everything and doesn't like it if anyone else gives out static addresses, so if refuses to run. Which is also why you can't use internet. So I guess you'll have to change /etc/network/interfaces back and figure out how to make dhcpcd behave, and give out the correct static address. At least that narrows down the problem to the dhcpcd-configuration...
            – dirkt
            yesterday






          • 1




            I specified that it should control only wlan0 but that's ok, I simply disabled it. I'm now having a problem that the wireless disappears after some time. That is. my SSID won't show up anymore. I created another question because this is a completely different problem, maybe you can help? unix.stackexchange.com/questions/460681/… anyways, I'm gonna accept your solution because it worked
            – Guerlando OCs
            yesterday














          up vote
          1
          down vote



          accepted










          If wlan0 is going to be the access point (AP), then you shouldn't attempt to use it as a client (station, STA). But this is what



          auto wlan0
          allow-hotplug wlan0
          iface wlan0 inet dhcp
          #wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf


          says: "Please use wlan0 as in client-mode, and get an IP address for it using DHCP". Instead, you want something like



          auto wlan0
          iface wlan0 inet static
          address 10.0.0.1
          netmask 255.255.255.0
          broadcast 10.0.0.255


          Replace 10.0.0.* and netmask with the IP range you want to have for your AP.






          share|improve this answer





















          • but in the tutorial I followed, it uses dhcpcd to configure wlan0. Shouldn't this configurations be overwritten?
            – Guerlando OCs
            yesterday










          • In the tutorial you followed, dhcpcd gave it a static address. It doesn't really matter who gives the interface the static address; if it gets one with dhcpcd, that's also fine. However, you wrote in the question that it gets 192.168.25.6, which suggests the dhcpcd method doesn't work (for whatever reason). Now you can either fix dhcpcd, or just give it the gorram static address in the first place.
            – dirkt
            yesterday










          • I tried your method and it worked, but I can't use internet, maybe a problem with routing. The dhcpd error is in the post. Do you have an idea of why it happens? It says that the error is due to /etc/network/interfaces
            – Guerlando OCs
            yesterday










          • I am not very familiar with dhcpcd (I use dhclient), but apparently it wants to control everything and doesn't like it if anyone else gives out static addresses, so if refuses to run. Which is also why you can't use internet. So I guess you'll have to change /etc/network/interfaces back and figure out how to make dhcpcd behave, and give out the correct static address. At least that narrows down the problem to the dhcpcd-configuration...
            – dirkt
            yesterday






          • 1




            I specified that it should control only wlan0 but that's ok, I simply disabled it. I'm now having a problem that the wireless disappears after some time. That is. my SSID won't show up anymore. I created another question because this is a completely different problem, maybe you can help? unix.stackexchange.com/questions/460681/… anyways, I'm gonna accept your solution because it worked
            – Guerlando OCs
            yesterday












          up vote
          1
          down vote



          accepted







          up vote
          1
          down vote



          accepted






          If wlan0 is going to be the access point (AP), then you shouldn't attempt to use it as a client (station, STA). But this is what



          auto wlan0
          allow-hotplug wlan0
          iface wlan0 inet dhcp
          #wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf


          says: "Please use wlan0 as in client-mode, and get an IP address for it using DHCP". Instead, you want something like



          auto wlan0
          iface wlan0 inet static
          address 10.0.0.1
          netmask 255.255.255.0
          broadcast 10.0.0.255


          Replace 10.0.0.* and netmask with the IP range you want to have for your AP.






          share|improve this answer













          If wlan0 is going to be the access point (AP), then you shouldn't attempt to use it as a client (station, STA). But this is what



          auto wlan0
          allow-hotplug wlan0
          iface wlan0 inet dhcp
          #wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf


          says: "Please use wlan0 as in client-mode, and get an IP address for it using DHCP". Instead, you want something like



          auto wlan0
          iface wlan0 inet static
          address 10.0.0.1
          netmask 255.255.255.0
          broadcast 10.0.0.255


          Replace 10.0.0.* and netmask with the IP range you want to have for your AP.







          share|improve this answer













          share|improve this answer



          share|improve this answer











          answered yesterday









          dirkt

          13.8k2930




          13.8k2930











          • but in the tutorial I followed, it uses dhcpcd to configure wlan0. Shouldn't this configurations be overwritten?
            – Guerlando OCs
            yesterday










          • In the tutorial you followed, dhcpcd gave it a static address. It doesn't really matter who gives the interface the static address; if it gets one with dhcpcd, that's also fine. However, you wrote in the question that it gets 192.168.25.6, which suggests the dhcpcd method doesn't work (for whatever reason). Now you can either fix dhcpcd, or just give it the gorram static address in the first place.
            – dirkt
            yesterday










          • I tried your method and it worked, but I can't use internet, maybe a problem with routing. The dhcpd error is in the post. Do you have an idea of why it happens? It says that the error is due to /etc/network/interfaces
            – Guerlando OCs
            yesterday










          • I am not very familiar with dhcpcd (I use dhclient), but apparently it wants to control everything and doesn't like it if anyone else gives out static addresses, so if refuses to run. Which is also why you can't use internet. So I guess you'll have to change /etc/network/interfaces back and figure out how to make dhcpcd behave, and give out the correct static address. At least that narrows down the problem to the dhcpcd-configuration...
            – dirkt
            yesterday






          • 1




            I specified that it should control only wlan0 but that's ok, I simply disabled it. I'm now having a problem that the wireless disappears after some time. That is. my SSID won't show up anymore. I created another question because this is a completely different problem, maybe you can help? unix.stackexchange.com/questions/460681/… anyways, I'm gonna accept your solution because it worked
            – Guerlando OCs
            yesterday
















          • but in the tutorial I followed, it uses dhcpcd to configure wlan0. Shouldn't this configurations be overwritten?
            – Guerlando OCs
            yesterday










          • In the tutorial you followed, dhcpcd gave it a static address. It doesn't really matter who gives the interface the static address; if it gets one with dhcpcd, that's also fine. However, you wrote in the question that it gets 192.168.25.6, which suggests the dhcpcd method doesn't work (for whatever reason). Now you can either fix dhcpcd, or just give it the gorram static address in the first place.
            – dirkt
            yesterday










          • I tried your method and it worked, but I can't use internet, maybe a problem with routing. The dhcpd error is in the post. Do you have an idea of why it happens? It says that the error is due to /etc/network/interfaces
            – Guerlando OCs
            yesterday










          • I am not very familiar with dhcpcd (I use dhclient), but apparently it wants to control everything and doesn't like it if anyone else gives out static addresses, so if refuses to run. Which is also why you can't use internet. So I guess you'll have to change /etc/network/interfaces back and figure out how to make dhcpcd behave, and give out the correct static address. At least that narrows down the problem to the dhcpcd-configuration...
            – dirkt
            yesterday






          • 1




            I specified that it should control only wlan0 but that's ok, I simply disabled it. I'm now having a problem that the wireless disappears after some time. That is. my SSID won't show up anymore. I created another question because this is a completely different problem, maybe you can help? unix.stackexchange.com/questions/460681/… anyways, I'm gonna accept your solution because it worked
            – Guerlando OCs
            yesterday















          but in the tutorial I followed, it uses dhcpcd to configure wlan0. Shouldn't this configurations be overwritten?
          – Guerlando OCs
          yesterday




          but in the tutorial I followed, it uses dhcpcd to configure wlan0. Shouldn't this configurations be overwritten?
          – Guerlando OCs
          yesterday












          In the tutorial you followed, dhcpcd gave it a static address. It doesn't really matter who gives the interface the static address; if it gets one with dhcpcd, that's also fine. However, you wrote in the question that it gets 192.168.25.6, which suggests the dhcpcd method doesn't work (for whatever reason). Now you can either fix dhcpcd, or just give it the gorram static address in the first place.
          – dirkt
          yesterday




          In the tutorial you followed, dhcpcd gave it a static address. It doesn't really matter who gives the interface the static address; if it gets one with dhcpcd, that's also fine. However, you wrote in the question that it gets 192.168.25.6, which suggests the dhcpcd method doesn't work (for whatever reason). Now you can either fix dhcpcd, or just give it the gorram static address in the first place.
          – dirkt
          yesterday












          I tried your method and it worked, but I can't use internet, maybe a problem with routing. The dhcpd error is in the post. Do you have an idea of why it happens? It says that the error is due to /etc/network/interfaces
          – Guerlando OCs
          yesterday




          I tried your method and it worked, but I can't use internet, maybe a problem with routing. The dhcpd error is in the post. Do you have an idea of why it happens? It says that the error is due to /etc/network/interfaces
          – Guerlando OCs
          yesterday












          I am not very familiar with dhcpcd (I use dhclient), but apparently it wants to control everything and doesn't like it if anyone else gives out static addresses, so if refuses to run. Which is also why you can't use internet. So I guess you'll have to change /etc/network/interfaces back and figure out how to make dhcpcd behave, and give out the correct static address. At least that narrows down the problem to the dhcpcd-configuration...
          – dirkt
          yesterday




          I am not very familiar with dhcpcd (I use dhclient), but apparently it wants to control everything and doesn't like it if anyone else gives out static addresses, so if refuses to run. Which is also why you can't use internet. So I guess you'll have to change /etc/network/interfaces back and figure out how to make dhcpcd behave, and give out the correct static address. At least that narrows down the problem to the dhcpcd-configuration...
          – dirkt
          yesterday




          1




          1




          I specified that it should control only wlan0 but that's ok, I simply disabled it. I'm now having a problem that the wireless disappears after some time. That is. my SSID won't show up anymore. I created another question because this is a completely different problem, maybe you can help? unix.stackexchange.com/questions/460681/… anyways, I'm gonna accept your solution because it worked
          – Guerlando OCs
          yesterday




          I specified that it should control only wlan0 but that's ok, I simply disabled it. I'm now having a problem that the wireless disappears after some time. That is. my SSID won't show up anymore. I created another question because this is a completely different problem, maybe you can help? unix.stackexchange.com/questions/460681/… anyways, I'm gonna accept your solution because it worked
          – Guerlando OCs
          yesterday












           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f460587%2fcreate-an-access-point-to-bridge-between-two-wireless-connections-how-should%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?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?