DEV Community

Cover image for How to Share Internet Connection on Linux (Server to Client via Ethernet)
B Mithilesh
B Mithilesh

Posted on

1

How to Share Internet Connection on Linux (Server to Client via Ethernet)

Sharing an Internet connection on Linux between two computers using an Ethernet cable might seem tricky at first, but it’s straightforward once you know the steps. Whether you’re troubleshooting, setting up a local network, or just exploring Linux networking, this guide has you covered.


📡 Steps to Configure Internet Sharing on the Server

1. Open Network Connections

  • Click on the network icon in the system tray or panel.
  • Select "Edit Connections..." from the dropdown menu.

2. Edit the Wired Connection

  • In the Network Connections dialog, locate and double-click your Wired Connection.
  • This is the connection that will be used to share Internet access. 👉 Leave the wireless connection untouched if it’s the one connected to the Internet.

3. Modify IPv4 Settings

  • Navigate to the "IPv4 Settings" tab.
  • Set the Method to "Shared to other computers".
  • Save and close the settings.

4. Reconnect the Wired Network

  • Disconnect and reconnect the Wired Network so it gets a new IP address.
  • Make sure the server and client are physically connected via an Ethernet cable.

5. Retrieve Connection Information

  • Click on "Connection Information" in the network menu.
  • Note down the IP address and network mask assigned to the wired connection. (Example: 10.42.0.1/255.255.255.0).

🖧 Steps to Configure the Client Computer

1. Open Network Connections

  • On the client computer, click the network icon and select "Edit Connections...".

2. Edit the Wired Connection

  • Locate and double-click your Wired Connection.

3. Modify IPv4 Settings

  • Navigate to the "IPv4 Settings" tab.
  • Set the Method to "Manual".
  • Assign an IP address on the same subnetwork as the server. 👉 Example: 10.42.0.69
  • Use the IP and network mask from the server for:
    • Netmask: 255.255.255.0
    • Gateway: 10.42.0.1
    • DNS Servers: 10.42.0.1

4. Reconnect the Wired Network

  • Disconnect and reconnect the Wired Network to apply the new settings.

🚀 Final Step

Pat yourself on the back and surf away! 🎉


📢 Additional Notes

  • Make sure the Ethernet cable is connected before reconnecting the networks on both computers.
  • If Internet sharing doesn’t work as expected, verify the server’s firewall settings to ensure proper traffic routing.

Let me know if you have any questions or if this guide worked for you in the comments! 👇

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (1)

Collapse
 
nedtechie profile image
Nedim Hadzimahmutovic

Screenshots please :)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay