Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enables port forwarding so that the LTE PC logger can talk to the LTE card through the T20. Change-Id: Id4ea9b0057c22a1e1f4193e1bb8e91dab8ca45ff
- Loading branch information
John Michelau
authored and
Wink Saville
committed
Apr 6, 2011
1 parent
f0b17bf
commit 452c4fe
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/system/bin/sh | ||
|
||
isBlanFound=0 | ||
|
||
for iface in `ls /sys/class/net` ; do | ||
desc=`cat /sys/class/net/$iface/description` | ||
case $desc in | ||
"Motorola BLAN Interface") | ||
echo "Found Motorola BLAN at $iface" | ||
echo "Forwarding ports for Wrigley diagnostics" | ||
echo 1 > /proc/sys/net/ipv4/ip_forward; | ||
/system/bin/iptables -t nat -A PREROUTING -p tcp -i $iface -d 192.168.16.2 --dport 11006 -j DNAT --to 192.168.20.2:11006; | ||
/system/bin/iptables -A FORWARD -p tcp -i $iface -d 192.168.20.2 --dport 11006 -j ACCEPT; | ||
isBlanFound=1; | ||
break | ||
;; | ||
*) | ||
echo "$iface is not the Motorola BLAN"; | ||
continue | ||
;; | ||
esac | ||
done | ||
|
||
case $isBlanFound in 0) echo "Could not find Motorola BLAN";; esac |