I have a computer (Lenovo S10-3 netbook with 2GB RAM and intel atom N550 dual core CPU). This computer is connected to the internet via WiFi using USB WLAN (TP-Link, I forget the exact type. It is a high gain USB WLAN adapter and using an atheros chipset). This adapter name is wlp0s29f7u3. This adapter IP address is 192.168.1.2/24.
I share this computer internet to this computer's the ethernet adapter (Realtek chipset) with the name enp5s0. This adapter IP address is 192.168.2.1/24.
The computer that access this computer's internet connection is connected to the same switch with this computer, and is configured with IP address 192.168.2.2/24 and default gateway set to 192.168.2.1
What i've done first is flush the iptable data :
Code:
iptables -F
iptables -t nat -F
Then I activate the rule using :
Code:
iptables -t nat -A POSTROUTING -o wlp0s29f7u3 -j MASQUERADE
iptables -A FORWARD -i enp5s0 -j ACCEPT
This worked perfectly, except that when I access the internet using the computer with IP address 192.168.2.2, The speed varies between 3 to 3.5 mbps (I tested this via wget to download a file from my web hosting). Whereas on this computer (the one who share the internet) can download the exact same URL with about 12 mbps speed. This method of sharing doesn't slow down ping, only slow down bandwidth.
I checked the connection from 192.168.2.1 to 192.168.2.2 using FTP, and it worked fine (80mbps to 90mbps, since it is a 100 mbps switch).
FYI, this happens both in ubuntu 14.04 64 bit or CentOS 7 64 bit.
Please help me. Thank you for your assistance.
I am sorry for my bad English, since I am not a native speaker. And I also sorry if this post is inappropriate, since I am a complete linux newbie.