36
submitted 1 day ago* (last edited 1 day ago) by sorrybookbroke@sh.itjust.works to c/linux@lemmy.ml

I suddenly need a wired connection for a job starting very soon but it won't be hooked up for quite some time. I have my neighborswifi password though. Iknow this is a longshot, but would I be able to use my laptop to change a wireless connection into a wired connection?

It's an older desktop Mac managed by the company. My laptop is an HP omen 15 with arch Linux on it

top 24 comments
sorted by: hot top controversial new old
[-] dr_jekell@lemmy.world 3 points 10 hours ago

Rather than trying to get your idea to work you would be better off getting a cheep WiFi access point as they often allow you to connect it to a wifi network and pass it through to wired devices via ethernet (bridging).

Some Wifi routers have a setting to allow it to be used in bridge mode as well.

[-] plateee@piefed.social 9 points 19 hours ago* (last edited 19 hours ago)

Wait, why are you doing this? Is there some network throughput requirement? Just bridging wifi to Ethernet won't get you Ethernet speed, latency, or stability (since the back haul to the internet is WiFi).

This feels a bit like an XY Problem.

Edit: Wait, I'm guessing the company doesn't allow wifi? (That seems weird, if they're using a mandatory VPN, it shouldn't matter how the laptop gets to the internet). Leaving this in case anyone doesn't know about XY Problems. They've bitten me several times over the years.

[-] TypFaffke@feddit.org 2 points 6 hours ago

So I knew about the concept behind XY problems. They come up in my job quite frequently. I didn't know the phenomenon had a name. And I have to say, that's one of the least helpful names for things like that.

[-] INeedMana@piefed.zip 3 points 14 hours ago

Unfortunately not every company has a reasonable Head of IT and/or policies

[-] sorrybookbroke@sh.itjust.works 8 points 19 hours ago* (last edited 18 hours ago)

Yup, company requirement. I'm hoping that this will make it seem like I have a wired connection when I actually don't. Though it is a bit of an XY problem as there are other solutions like using a router in bridge mode as others have stated

[-] plateee@piefed.social 4 points 10 hours ago

In that case, grab one of these: GL-iNet Opal Travel Router.

They're sub $40 on Amazon (in the states), will do bridging for you, and are rock solid. I've used one for the past three years whenever I've traveled to conferences/for work.

[-] user28282912@piefed.social 11 points 22 hours ago* (last edited 8 hours ago)

Assuming that:

  • your Linux Laptop uses wlan0 for its wireless connection and your home network uses 192.168.1.x for IP space.

On the Linux laptop:

  • as root or with sudo -- enable IP forwarding and load the change with sysctl -p.

sudo sysctl net.ipv4.ip_forward=1 ## updated edit thanks to folks pointing out my typo.
sudo sysctl -p

  • if you have ufw installed and running -- setup a NAT masquerading rule for any hosts forwarding IPv4 traffic to it.
    add this line to /etc/ufw/before.rules file right after the "*nat" line

:POSTROUTING ACCEPT [0:0]

-A POSTROUTING -s 192.168.1.1/24 -o wlan0 -j MASQUERADE

On the mac:

  • set your IP address manually to be on the same LAN as the Linux laptop, but for the gateway address... point that at the IP for the Linux Laptop.
[-] FauxLiving@lemmy.world 7 points 17 hours ago* (last edited 17 hours ago)

sudo sysctl net.ipv4.ip_forward

sudo sysctl -p

Those do not enable forwarding. One prints the value of forwarding and the other loads the config file.

To set it temporarily

sudo sysctl net.ipv4.ip_forward=1

To set it permanantly, edit /etc/sysctl.conf (or add a config file to /etc/sysctl.d/). You only need to add one line that reads 'net.ipv4.ip_forward=1'

[-] user28282912@piefed.social 1 points 8 hours ago

Thanks for noticing that. I certainly missed the '=1' bit.

[-] INeedMana@piefed.zip 23 points 1 day ago

Yes, it's called IP Forwarding. I don't have iptables lines ready, it's been a long while since I've done it

[-] pageflight@piefed.social 1 points 1 day ago

If you just run dhcpd on eth0 would that be enough? I'm assuming no based on your answer.

[-] INeedMana@piefed.zip 2 points 14 hours ago

Ah, that link did not go into details, I'm sorry. Take a look here. It might look daunting but effectively it was just a few lines AFAIR

[-] osaerisxero@kbin.melroy.org 8 points 1 day ago

No, because there wouldn't be anything connecting the two ports together. In your scenario, all each side would be able to do would be to talk to 'cpu', there would be no mechanism to forward traffic upstream without iptables or something similar handling that function.

[-] rouxdoo@lemmy.world 16 points 1 day ago

Get a cheap travel router that can use "bridge mode" to receive the wifi and pass along the connection through it's ethernet port to your computer.

[-] sorrybookbroke@sh.itjust.works 4 points 1 day ago

I have a spare router so this'll be better if it works out. Thanks for the suggestion

[-] db2@lemmy.world 8 points 1 day ago* (last edited 1 day ago)

Don't do it the hard way. Get a GL.iNet GL-SFT1200 (or any but that one is inexpensive) and set it up as an extender for the neighbor WiFi. It's a basic function of the router and the Mac shouldn't know the difference.

You can, but you need to basically completely turn that laptop into a router. A cheap WiFi bridge would be more flexible.

[-] yaroto98@lemmy.world 8 points 1 day ago

A lot of wifi routers have a bridge mode you can put them in too. Just grab an old or cheap one, would likely draw less power and be quieter.

Great point.

[-] MagnificentSteiner@lemmy.zip 5 points 23 hours ago

If you have a mobile phone you just just connect it to your laptop via USB and turn on tethering to use your mobile data.

Basically what you want is to turn the linux laptop into a router. Thats doable. I believe Ars did an article on a similar build a couple years ago.

And here it is: https://arstechnica.com/gadgets/2016/04/the-ars-guide-to-building-a-linux-router-from-scratch/

It's an old build based on an almost 10 year old version of Ubuntu, but quickly glancing through it, I didn't see anything completely out of date. Version numbers will have changed and perhaps some package names will have changed but it will give you a starting point for further research. You won't want to cargo cult this build.

I think the main difference is that your internet would be coming in from the wifi interface and going out the ethernet interface rather than the other way around.

[-] elmicha@feddit.org 3 points 1 day ago
[-] sorrybookbroke@sh.itjust.works 3 points 1 day ago

Wow that looks promising thank you for that

[-] mattesilver@101010.pl 1 points 1 day ago

@sorrybookbroke sure, you just need $99.99 apple-compatible cross-over ethernet cable

this post was submitted on 23 Feb 2026
36 points (97.4% liked)

Linux

62524 readers
499 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 6 years ago
MODERATORS