I have a laptop running Debian 7 that connects to my building's Wifi. I want so share this network connection via the laptop's Ethernet port.
I have setup a script below to do this based on some Googling. It does forward the traffic fine to eth0, however it almost completely kills the networking performance on the laptop. I can only fully restore networking performance on the laptop by subsequently running "sudo sysctl -w net.ipv4.ip_forward=0".
Is there any way I can have this IP forwarding working but still retain good networking performance on the laptop?
#!/bin/bash sudo sysctl -w net.ipv4.ip_forward=1 sudo iptables -t nat -A POSTROUTING -s 172.16.0.38/16 -o wlan0 -j MASQUERADE