User Tools

Site Tools



en:bpi-r2:hwnat

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:bpi-r2:hwnat [2017/12/30 12:04]
frank
en:bpi-r2:hwnat [2020/08/29 17:14] (current)
Line 2: Line 2:
  
   * available in LEDE [[http://forum.banana-pi.org/t/bpi-r2-lede-source-code-for-hardware-nat/3940|forum]]   * available in LEDE [[http://forum.banana-pi.org/t/bpi-r2-lede-source-code-for-hardware-nat/3940|forum]]
-  * should work with 4.14, Test: https://github.com/frank-w/BPI-R2-4.14/tree/hnat+  * seems to work with 4.14, Test: https://github.com/frank-w/BPI-R2-4.14/tree/4.14-hnat [[http://forum.banana-pi.org/t/bpi-r2-kernel-4-14-hnat/4486/43|forum]]
   * no support in 4.4.70 [[http://forum.banana-pi.org/t/bpi-r2-lede-source-code-for-hardware-nat/3940/15|forum]]   * no support in 4.4.70 [[http://forum.banana-pi.org/t/bpi-r2-lede-source-code-for-hardware-nat/3940/15|forum]]
  
-[[https://github.com/garywangcn/bpi-r2_lede/commit/ef3ced07e505b40e04724f257dffea9c4d388fca#diff-c6d162794f4d9c3773b8a3ef2375785b|Patch]]+Current implementation works only between lan and wan (not wifi or other interfaces) 
 + 
 +at least you have to setup nat on wan: 
 +<code> 
 +ipt=/sbin/iptables 
 +if_wan=wan 
 +${ipt} -t nat -F 
 +${ipt} -t nat -A POSTROUTING -o ${if_wan} -j MASQUERADE 
 +</code> 
 + 
 +and load hnat-module: 
 + 
 +  modprobe mtkhnat 
 + 
 +Check if it is working with 
 +<code> 
 +#via debugfs (working shows BIND-state) 
 +cat /sys/kernel/debug/hnat/all_entry 
 +#via interrupts (counter does not increase after a while (download)) 
 +cat /proc/interrupts | grep 'ethernet' 
 +</code> 
 + 
 +[[https://github.com/garywangcn/bpi-r2_lede/commit/ef3ced07e505b40e04724f257dffea9c4d388fca#diff-c6d162794f4d9c3773b8a3ef2375785b|original-Patch for 4.9 (lede)]]
en/bpi-r2/hwnat.1514631853.txt.gz · Last modified: 2020/08/29 17:14 (external edit)