View Single Post
Old 04-05-2012, 06:20 AM   #20
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
EDIT:
This post was being written while the O.P. was writing his "solved" post. Which is how the posts got out of order here, the O.P. types faster than I do.

Quote:
Originally Posted by lsi View Post
I used the USBnetwork extension included in
2. Launcher - https://www.mobileread.com/forums/sho...d.php?t=161263

There is no readme in it, but I understand that the usbnetwork.sh (attached) should take care of the firewall, but does it start the ssh daemon?
I have read that one before...

As written, it opens port 22 for the network device wlan0 (usually the Wifi, unless renamed in a udev rule).

In fact, it adds that rule regardless of the action to be taken (adding or removing) the usb networking entry from the launcher menu; without checking if that iptables rule already exists.
Which can lead to multiple copies of the same firewall rule in iptables, one copy for each time this script was run. Not harmful, just a bit messy.

Whereas the usb networking would be network device usb0 (unless renamed somewhere in the device scripting - such as with the udev rules).

So once this script has been run (conditions set to add the usbnetworking to the lanucher menu)....

Then there should be an entry in your launcher menu to turn on (start the ssh daemon) and diddle the firewall rule in iptables for device usb0.

Check in your launcher menu for the usbnetworking menu entry, turn it on.

Notes:
If the "-i wlan0" argument to that iptables rule was removed, then port 22 would always be open in the firewall for any device rather than only the specified interface "-i" device.

Since the addition of the iptables rule is in both sides of the condition statement, then it could be outside of the condition statement.
And since it is never removed - made part of the package installation (complete with a check to see if another package has already added the rule or the general rule without the interface device specification).
Again, not harmful, just a bit messy to be diddling a rule for wlan0 in a script for installing access to the usb0 interface device.

Last edited by knc1; 04-05-2012 at 06:30 AM.
knc1 is offline   Reply With Quote