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

Linux

63197 readers
645 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
 

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

you are viewing a single comment's thread
view the rest of the comments
[–] user28282912@piefed.social 9 points 11 hours ago* (last edited 11 hours ago) (1 children)

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
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 4 points 7 hours ago* (last edited 7 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'