Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 05-15-2012, 12:24 AM   #1
dogcalas
Junior Member
dogcalas began at the beginning.
 
Posts: 4
Karma: 10
Join Date: May 2012
Device: Kindle Touch
Question Connecting to internet throug my computer with usbNet, KT

Hello, I already made a jailbreak to my KT and I installed usbNet.
I want to connect it to my College's ISP using my PC, because i don't have wireless and i need to register my kindle with Amazon.
The connection to the KT using ssh is working. Here are my data
IP
KT -> 192.168.15.244
PC(usb0) -> 192.168.15.1
PC(eth0) ->10.8.10.157
gatway -> 10.8.10.254
DNS -> 10.0.0.3

My Pc has Ubuntu 12.04.

I want to know how to configure my kindle touch to connect it to my College network , and use the web browser to surf in that network.Also I want to know if is possible configure a proxy in the Kindle.

Thanks and sorry for my english
dogcalas is offline   Reply With Quote
Old 05-15-2012, 12:33 AM   #2
thomass
Wizard
thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.
 
Posts: 1,644
Karma: 1928003
Join Date: Mar 2011
Location: Türkiye
Device: Kindle 5.3.7
deleted.
thomass is offline   Reply With Quote
 
Advertisement
Old 05-15-2012, 01:17 AM   #3
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,903
Karma: 6677559
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
It should be pretty much the standard way to configure any Linux network (Kindle), or to set up a masquerading router (PC).

Make sure that your PC is correctly configured to forward packets from "internal" (usb0) to "external" (eth0), and back, using NAT. Here's a very compressed howto, use your favorite search engine to find more exhaustive documentation if needed: http://www.revsys.com/writings/quicktips/nat.html

Then configure the Kindle to use 192.168.15.1 as the default gateway. Finally, I don't remember exactly how DNS is configured on the Kindle, but I'd try the standard way (/etc/resolv.conf) first.

As far as the proxy is concerned: I don't know. There might be a setting buried deep inside the system, or there might not.
ixtab is offline   Reply With Quote
Old 05-15-2012, 02:55 AM   #4
dogcalas
Junior Member
dogcalas began at the beginning.
 
Posts: 4
Karma: 10
Join Date: May 2012
Device: Kindle Touch
FIRST, I want to thanks @ixtab you for u time,
I configured the PC to forward packets, but in the Kindle to set the gateway is it like in a normal linux PC? /etc/network/interfaces, when i opened that file, it showed this
auto usb0
iface usb0 inet dhcp

and i am not sure but, usb0 isn't dhcp, it has a fixed ip 192.168.15.244. How i configure gateway on the Kindle.?
I opened /etc/resolv.conf and is empty, i am going to configue it like i do in Linux

domain uci.cu
nameserver 10.0.0.3

If i use the vi to edit files in the kindle, what i have to press to save?
Sorry for my English.
dogcalas is offline   Reply With Quote
Old 05-15-2012, 04:06 AM   #5
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,903
Karma: 6677559
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Quote:
Originally Posted by dogcalas View Post
FIRST, I want to thanks @ixtab you for u time,
I configured the PC to forward packets, but in the Kindle to set the gateway is it like in a normal linux PC? /etc/network/interfaces, when i opened that file, it showed this
auto usb0
iface usb0 inet dhcp
and i am not sure but, usb0 isn't dhcp, it has a fixed ip 192.168.15.244.
Well, if it really is DHCP (I doubt it), then actually running dnsmasq on the PC might be an option to auto-configure the Kindle.

Quote:
Originally Posted by dogcalas View Post
How i configure gateway on the Kindle.?
route add default gw 192.168.15.1

Quote:
Originally Posted by dogcalas View Post
I opened /etc/resolv.conf and is empty, i am going to configue it like i do in Linux

domain uci.cu
nameserver 10.0.0.3

If i use the vi to edit files in the kindle, what i have to press to save?
Sorry for my English.
The really, really most basic commands in vi:
Press "i" to start editing
Press "Escape" to end editing
type ":wq!" to save and quit.

"vi is not an editor" - "What is it then?" - "I think it makes music. All I seem to get from it is beeps"
ixtab is offline   Reply With Quote
Old 05-15-2012, 10:33 AM   #6
knc1
Helpdesk Junkie
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: 7,028
Karma: 6359394
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by dogcalas View Post
FIRST, I want to thanks @ixtab you for u time,
I configured the PC to forward packets, but in the Kindle to set the gateway is it like in a normal linux PC? /etc/network/interfaces, when i opened that file, it showed this
auto usb0
iface usb0 inet dhcp

and i am not sure but, usb0 isn't dhcp, it has a fixed ip 192.168.15.244.
Then you just answered your own question. The kindle isn't recognizing and/or processing the /etc/network/interfaces "dhcp" field.
Quote:
Originally Posted by dogcalas View Post
How i configure gateway on the Kindle.?
Ah, a forbidden topic on this site.
BUT...
I think you meant to ask "how do I configure the Kindle to use a gateway"?
Ans: Same as any other networking stack, set /dev/usb0 as the device for the default route.
Quote:
Originally Posted by dogcalas View Post
I opened /etc/resolv.conf and is empty, i am going to configue it like i do in Linux

domain uci.cu
nameserver 10.0.0.3
The Kindle is Linux.
Although you'll find differences in how an embedded Linux uses (or not) its control files.

Last edited by knc1; 05-15-2012 at 11:40 AM.
knc1 is offline   Reply With Quote
Old 05-15-2012, 11:23 AM   #7
geekmaster
Всё гениальное просто.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 5,070
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Does the kindle web browser proxy through amazon when using wifi? If so, giving information to enable tethering (using the kindle as a gateway to share kindle internet access with a PC) would be a "forbidden topic" at this website, because a tethering solution that gets through the amazon proxy would also work for 3G access (which violates the amazon TOS and may be illegal as well).

In fact, even if you use tethering legally through wifi, if you kindle supports 3G and wifi drops out, it will automatically switch to 3G and you find yourself getting into troublesome areas completely unaware of the situation.

So... this discussion on tethering can easily get into "gray areas" of legality (and beyond)...

EDIT: However, if the kindle wifi connection does NOT go through the amazon proxy, then this is a non-issue (so you can disregard my warning, in that case). Just be sure of what you do and how you do it.

Devs: does anybody here know for sure whether wifi connections proxy through amazon, and if there is any warning before a tethered connection switches to 3G when the wifi is lost?

Basically, what I want to know, is there a SAFE way to do wifi-only tethering that WILL NOT go through the 3G connection when the wifi connection is lost? If not, we cannot support tethering even for a "wifi-only" connection.



Last edited by geekmaster; 05-15-2012 at 11:32 AM.
geekmaster is offline   Reply With Quote
Old 05-15-2012, 11:38 AM   #8
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,903
Karma: 6677559
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
@geekmaster: the OP's question was about using the PC's internet connection to bring the Kindle online via usbnet, because there is no WiFi.

This has nothing to do with tethering, but is a different situation than what you are referring to, and is completely legal.
ixtab is offline   Reply With Quote
Old 05-15-2012, 11:47 AM   #9
geekmaster
Всё гениальное просто.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 5,070
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Quote:
Originally Posted by ixtab View Post
@geekmaster: the OP's question was about using the PC's internet connection to bring the Kindle online via usbnet, because there is no WiFi.

This has nothing to do with tethering, but is a different situation than what you are referring to, and is completely legal.
His second question is about configuring a proxy IN the kindle. How is that NOT tethering?

EDIT: I realize that configuring a kindle to use the host PCs internet is also technically called "tethering", but then what is the OP's second question about installing a gateway in the kindle to be used for? A gateway IN the kindle can be used for the popular "theft of 3G" kind of tethering, if used on a kindle with 3G.

I am just trying to clear things up here and warn of potential abuse situations, but apparently I am only making it more confusing. Sorry.



Last edited by geekmaster; 05-15-2012 at 11:55 AM.
geekmaster is offline   Reply With Quote
Old 05-15-2012, 11:55 AM   #10
knc1
Helpdesk Junkie
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: 7,028
Karma: 6359394
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by geekmaster View Post
His second question is about configuring a proxy IN the kindle. How is that NOT tethering?
His second question reflects the same level of English skill as his first one.
And the O.P. mention that English wasn't his native language.

From context, he wants to configure his Kindle to use a "PC gateway" and an "off-Kindle proxy server".

I didn't answer O.P.'s second question, because that should be a PC configuration change, transparent to the Kindle once he gets his Kindle's default route (and iptables) set correctly.
knc1 is offline   Reply With Quote
Old 05-15-2012, 12:12 PM   #11
geekmaster
Всё гениальное просто.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 5,070
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Quote:
Originally Posted by knc1 View Post
His second question reflects the same level of English skill as his first one.
And the O.P. mention that English wasn't his native language.

From context, he wants to configure his Kindle to use a "PC gateway" and an "off-Kindle proxy server".

I didn't answer O.P.'s second question, because that should be a PC configuration change, transparent to the Kindle once he gets his Kindle's default route (and iptables) set correctly.
Okay, so we just need a simple set of instructions on how to set up the host PC as an internet gateway to use with the kindle.

In that case, *I* would like to know the answer to this question too (I do not have time to "RTFM" right now)...
geekmaster is offline   Reply With Quote
Old 05-15-2012, 12:33 PM   #12
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,903
Karma: 6677559
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Host:
Code:
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -i eth0 -o usb0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i usb0 -o eth0 -j ACCEPT
Kindle:
Code:
route add default gw 192.168.1.15
echo "nameserver 8.8.8.8" > /etc/resolv.conf
This is all untested (I don't even even the Kindle here), but that's the idea. I'll test it when I get home (and possibly update this post if I got something wrong).
ixtab is offline   Reply With Quote
Old 05-15-2012, 12:45 PM   #13
knc1
Helpdesk Junkie
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: 7,028
Karma: 6359394
Join Date: Feb 2012
Device: Too many.
This one is tested and known to work - I'm writing to you through it at this moment.
This post shows a bit more of the details.

Quote:
Originally Posted by geekmaster View Post
Okay, so we just need a simple set of instructions on how to set up the host PC as an internet gateway to use with the kindle.

In that case, *I* would like to know the answer to this question too (I do not have time to "RTFM" right now)...
On the Kindle - set the default route to use /dev/usb0
(It may be set by the usbnet start, but if not, set it)

On the PC -
With "WORLD" set to the output device (sometimes: eth0);
With "IPT" set to /sbin/iptables (or its location on your machine):
Code:
# Default policy
DEF_POLICY='ACCEPT'

# NIC that connects to the outside world (via modem, cable, aDSL, whatever)
# Or if using dial-up and ppp - set WORLD to the name of the ppp interface (ppp0).
# Whereas, on the Kindle, you would prohibit using the ppp interface (that's the 3G card).
WORLD='eth0'

# Set default policy
$IPT -P INPUT   $DEF_POLICY   # Packets arriving
$IPT -P OUTPUT  $DEF_POLICY   # Packets locally generated
$IPT -P FORWARD $DEF_POLICY   # Packets in transit

# Anything output to world must masquerade
$IPT -t nat -A POSTROUTING -o $WORLD -j MASQUERADE

# Anything on input chain established or related is acceptable
$IPT -t filter -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

# Anything on input chain that's new is acceptable EXCEPT from world
$IPT -t filter -A INPUT -m state --state NEW -i '!'$WORLD -j ACCEPT

# Now handle any packets that where not handled by the above rules
$IPT -t filter -A INPUT -p tcp -i $WORLD -j REJECT --reject-with tcp-reset
$IPT -t filter -A INPUT        -i $WORLD -j DROP
Which turns the firewall into a one-way, network address translation, firewall. No __NEW__ connections allowed in-bound, only replies to out-bound traffic.

Then poke the box into "router mode":
Code:
# Enable IPv4 forwarding 0 == Disable, 1 == Enable
echo 1 > /proc/sys/net/ipv4/ip_forward
Note 1: If the PC already has iptable rules - then intellegently merge the above functions into them.

Note 2: Do not do the above on the Kindle. The above is too simple to keep you out of trouble.

Edit:
When did this forum turn into a Linux Newbie site?
Hello Web Masters - Better just put up a "Linux Newbie" forum - these questions will never go away.

Last edited by knc1; 05-15-2012 at 01:17 PM.
knc1 is offline   Reply With Quote
Old 05-15-2012, 01:26 PM   #14
geekmaster
Всё гениальное просто.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 5,070
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Quote:
Originally Posted by knc1 View Post
Edit:
When did this forum turn into a Linux Newbie site?
Hello Web Masters - Better just put up a "Linux Newbie" forum - these questions will never go away.
Watch who you are calling a "newbie" here, dude.

Really, I spent too much time on the zforcediag thing when I *should* have been working on other things. Back to work! ttyl...
geekmaster is offline   Reply With Quote
Old 05-15-2012, 01:48 PM   #15
knc1
Helpdesk Junkie
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: 7,028
Karma: 6359394
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by geekmaster View Post
Watch who you are calling a "newbie" here, dude.

Really, I spent too much time on the zforcediag thing when I *should* have been working on other things. Back to work! ttyl...
Comment was not directed at you. You made a polite request with a good reason, anyone who reads here would understand your: "too busy to RTFM".

Ah, but recently, there have been an increasing number of "Linux Newbie" questions, better served if we had a forum by that title.
knc1 is offline   Reply With Quote
Reply

Tags
kt internet usbnet

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
connecting ipad to the internet through an android phone? jojoba Apple Devices 4 11-13-2011 08:34 AM
How do you fix an Ipad when it keeps crashing while connecting to the internet? JcDubrey Apple Devices 1 08-24-2011 12:50 AM
Will connecting to the internet lead to firmware update? Len666 Amazon Kindle 9 05-08-2011 10:14 AM
Kindle 1 not connecting to the internet/downloading at all...help! IntegrityWolf Amazon Kindle 4 06-30-2009 01:21 AM
Connecting the iLiad to Internet sputnik iRex 7 05-28-2008 12:59 PM


All times are GMT -4. The time now is 09:01 AM.


MobileRead.com is a privately owned, operated and funded community.