0

I have installed Ubuntu 22.04 on my laptop which has a LAN and a WIFI network adapter. The laptop is connected to the Internet via WIFI. I have another PC with a LAN adapter card. I want to set my laptop as a router to connect the PC to the Internet. I've enabled ip forwarding on the laptop according to How to make IP forwarding permanent?.

I've set the IP addresses of the LAN adapters as the following.

Laptop: 192.168.144.76/24 
PC:     192.168.144.75/24

I also set the default gateway of the PC to the IP address of the laptop's LAN network adapter.

But although the PC can ping the LAN adapter of the laptop and the laptop can ping 8.8.8.8, the PC is not connected to the Internet. Please help me.

  • 1
    You have enabled IP forwarding to be used, but have not specified how to do so. You need some iptables, or nftables rules to implement a router on your laptop. Try this as a starting point, but there are likely better examples. – Doug Smythies Nov 28 '23 at 15:38
  • @DougSmythies Thank you very much. The problem has been resolved! – user153245 Nov 28 '23 at 16:24

0 Answers0