i have setup a lan and it is working fine, i added an internet connection to one of the pc and it is browsing.i want to share the internet connection to other system and is not working after enabling the sharing and allow other computer to connect through this system.pe hel me

Dani AI

Generated

Following up on and the suggestions from and , here are concise, practical checks and fixes when a single PC has internet but other LAN machines cannot use it after turning on Sharing.

Common causes and quick checks:

  • Confirm the internet-facing adapter was the one shared (not the LAN adapter), and that the host still has an internet route after sharing was enabled.
  • Verify client addressing: clients should get an IP/gateway from the host (or be set manually to the host IP as gateway). On Windows ICS the host often becomes 192.168.137.1 and runs a DHCP server for the LAN side.
  • Test connectivity in this order: can the client ping the host? can the client ping an external IP (8.8.8.8)? can it resolve a domain (nslookup)? Those three results isolate host reachability, NAT, and DNS problems.
  • Temporarily disable any third-party firewall/security suite on the host (Windows ZoneAlarm, etc.) — these commonly block ICS/NAT. Re-enable after testing.

Useful commands and a Linux NAT example:

# Inspect addresses
Windows host:   ipconfig /all
Linux host:     ip addr show

# From a client (replace <host-IP>)
ping <host-IP>
ping 8.8.8.8
nslookup google.com

# Linux NAT (example; replace <internet-if>)
sudo sysctl -w net.ipv4.ip_forward=1
sudo iptables -t nat -A POSTROUTING -o <internet-if> -j MASQUERADE

Notes and recommendation:

  • VPNs, some USB modems and certain ISP connection types (PPPoE) can prevent simple sharing from working.
  • Running a PC as the gateway requires that PC to stay on and patched; it is less robust than a dedicated router. As hinted, a small consumer router or Wi‑Fi access point between the ISP link and the LAN is usually the simplest, most reliable solution.

Recommended Answers

All 2 Replies

You can do that, but it means that you need to configure the PC with internet connection as a router. How you do that depends entirely upon the operating system you are using (Windows, Linux, Apple-OSX).

its sounds like you are trying to share the internet connection through one computer. As rubberman is suggesting, why not have an Internet Router connected between the LAN and your provider. This way, each PC goes through the router to access the Internet. In your scenario, every other host on the network would have to get their access through this one PC.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.