Most efficient way to route al traffic from eth0 to wlan0

خرید بک لینک

I use a Raspberry PI (model B, first generation) as a NAT router. I use a wifi usb adapter to connect to a wifi network, and route all taffic to eth0.

I enabled NAT and issued the following iptables rule in order to forward the traffic:

iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE

There are no other iptables rules and all default policies are ACCEPT. The inteet connection is working and it's correctly shared to eth0.

Eventually, I noticed that a sudden increase of the packet transmission rate, for example when I start downloading a big file, caused the inteet connection to stop working until I issue new connect command via wicd.

I did monitor the PI load, and noticed that with about 1000kb/s download rate, a kworker process on the PI is eating about 40+ percent of CPU. In fact, overclocking the PI did result in a better performance and less inteet connection drop rate.

Therefore the question: am I using a very inefficient NAT set up?

I read on the inteet various methods about bypassing the keel, but I did not understand if this is applicable in this situation and I don't even know if it's an overkill given the simple task that my PI has to achieve.

Recent Questions...

ما را در سایت Recent Questions دنبال می‌کنید

برچسب: نویسنده: استخدام کار بازدید: 181 تاريخ: يکشنبه 19 ارديبهشت 1395 ساعت: 18:09

صفحه بندی