Not sure if that title is accurate, this field is not my strong point. Basically I’m about to move homes. And in my new (temporary) home I wont have access to ethernet, plus my server doesn’t have a network card. I was therefore wondering if it was possible to bridge a connection between my laptop to my server with an ethernet cable. This would obviously be a short term solution, but I’m wondering if it’s possible and if so, how? Or is it better to buy a cheap network card?

My laptop is running NixOS and my server Unraid, if it should be to any help.

  • axzxc1236@lemm.ee
    link
    fedilink
    arrow-up
    5
    ·
    2 years ago

    In NetworkManager you can setup network sharing using Ethernet port on the laptop, then connect cable to your server.

    Downside of that is you need to setup port forwarding in your laptop if you want to open port.

  • Cyborganism@lemmy.ca
    link
    fedilink
    arrow-up
    4
    ·
    2 years ago

    Of course you can.

    However, my networking knowledge is not super fresh. I believe you need a special ethernet cable for this. A crossover ethernet cable. Then you have to manually set the IP address on both ends for that interface to something kind 192.168.0.1 and 192.168.0.2 Here’s a quick how-to that shows an example.

    Or… You don’t have an individual router? Couldn’t you just plug it in the router by ethernet cable?

  • SpicyAnt@mander.xyz
    link
    fedilink
    arrow-up
    3
    ·
    2 years ago

    One way is to use iptables to forward the connection from the wireless interface through the ethernet interface. But I am not sure whether this is better than using the NetworkManager or a more specialized solution. I have used iptables for configuring WireGuard VPNs, but not for this specific use case.

  • mvirts@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    2 years ago

    I have a raspi 3b dedicated to being my wifi to ethernet bridge, the config is old and it runs rpi os but if your interested i can dig up how it works 🙃

    • towerful@programming.dev
      link
      fedilink
      arrow-up
      2
      ·
      2 years ago

      You can do the same with $25 mikrotik device.
      Infact, a lot of cheap wireless APs can connect to a wifi and bridge to ethernet, especially if they are running an openWRT fork (most cheapo wifi APs do)

    • Lunch@lemmy.worldOP
      link
      fedilink
      arrow-up
      1
      ·
      2 years ago

      I actually do have a spear rpi actually! However I was planning on running HomeassistantOS on it. But could do what you do as a temporary solution. If you wouldn’t mind and have the time to look up your solution I would highly appreciate it 🙌

  • anamethatisnt@lemmy.world
    link
    fedilink
    arrow-up
    1
    arrow-down
    1
    ·
    2 years ago

    An option is to buy a router that supports openwrt and install the travelmate package:
    Quick Start Guide:
    https://openwrt.org/docs/guide-quick-start/start
    Travelmate Readme:
    https://github.com/openwrt/packages/blob/master/net/travelmate/files/README.md
    Supported hardware:
    https://openwrt.org/toh/start?toh.filter.supportedcurrentrel=22.03|23.05

    Then you could setup Wireless WAN (Connect to existing WiFi) + Wireless LAN (for laptop/phone) + Ethernet LAN (for server) in that router.