OpenWrt Forum Archive

Topic: Kamikaze/8.09: console query

The content of this topic has been archived on 21 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Friends:

I grant to all geeks free license to take offense at my newbie question that follows.

I am using K/8.09 c/w LuCi to manage my ISP access via WRT54GL. And it works only ... perfectly! And was very simple to install. The writers are to be congratulated for a wizard job!

Aber.
Now I need to get out and connect to smxi (to dist-upgrade my sidux OS) from console (with X-server shut down). And I can't find how to do that. In console, I'm able to log in to my Kamikaze software. And to call up "help"- which doesn't. So what do I do next to get out to the web- where do I find a howto, please?

Friendly greetings from Alberta. Spring has f i n a l l y sprung!
nina

Thank you for replying, MMCM. You have misunderstood me; I'm sorry for having been so unclear.
To access internet from console, I (appear to) need to be logged onto my router. So I: ssh 192.168.x.x, and give my root password, and it's accepted.
But then? SVP, how do I then ask console to connect me to a URL in the outside world?
nina

I don't really know what smxi is, but I suppose it has something to do with upgrading your desktop machine. You do not need to log into the router in order to access the internet. Just run the necessary commands on your desktop machine. Any command that would work in a terminal while running X should work in a virtual console too (without X). E.g. Try "ping google.com". Press ctrl-c to kill it. If you are still confused I think the smxi forums would probably be the best place to ask. Your router should be irrelevant. The router does not know if you are running X,  so if you do not need to jog into it to access the internet when you are running X, you will also not need to when you are not running X.

Can't you just use an SSH tunnel to achieve this?  If it's an X11 application just make sure you have used -X parmeter and/or enabled the "forwardX11" flags in your SSH configuration files.  Alternatively if it's not X11 just use port forwarding e.g. ssh -L 5090:internalIP:5090 root@router and then from your local system connect to localhost:5090.

(Last edited by vincentfox on 27 May 2009, 00:03)

vincentfox: I think we need more info.  I doubt any SSH tunnels etc. are necessary.  To access the internet from a virtual console on the desktop machine you don't need to do anything that you wouldn't have to do if you were trying to access the internet from X.

nina: If you want to browse the web from the virtual console you will need a text-based browser (e.g. Lynx, Links or w3m) on your desktop machine, but I doubt this is what you are trying to do.  If you just need to run the smxi script(s) then just run them and see what happens.  Why do you think you need to SSH to the router first?

nina wrote:

Friends:
Now I need to get out and connect to smxi (to dist-upgrade my sidux OS) from console (with X-server shut down)

Explain in layman term


Woodin wrote:

If you want to browse the web from the virtual console you will need a text-based browser (e.g. Lynx, Links or w3m) on your desktop machine, but I doubt this is what you are trying to do.  If you just need to run the smxi script(s) then just run them and see what happens.  Why do you think you need to SSH to the router first?

I seconfd that if that he/she means

Thank you all for replying.
Please ignore my reference to smxi- it's only where I want to go. Sorry for that red herring.
So. In pure console, not having started x; as root, from root directory:
I did: ping google.com
and lines displayed at intervals, ad infinitem, which began:
64 bytes from gw-in-f100.google.com (74.125.67.100);
And control-c let me back to my root prompt.
I then did: man elinks     Yes, man elinks is there.
q put me back to root prompt. I then did: elinks   It displayed.
I fed elinks the URL HTTP:/www.google.com , pressed enter, and a new screen displayed, showing only "Making connection" And nothing else happens. At the top of the screen one can access menus: File, View, Link, etc.
But the connection isn't made.
I offered another URL: same result.
So to put this as politely as I can: why am I not connecting if not because my router's not letting me out because I'm not logged on?

Sidux (my OS) frowns on users going online as root. I haven't asked, but could there perhaps be a built-in prevention which one has to explicitely over-ride?

Thanks, all. Any patience left for further suggestions? This is all rocket surgery to me.
nina

nina wrote:

Thank you all for replying.
Please ignore my reference to smxi- it's only where I want to go. Sorry for that red herring.
So. In pure console, not having started x; as root, from root directory:
I did: ping google.com
and lines displayed at intervals, ad infinitem, which began:
64 bytes from gw-in-f100.google.com (74.125.67.100);
And control-c let me back to my root prompt.

This means that you are able to send packets from your desktop through your router all the way to google and get replies from google again, so your Internet access looks like it's working.  DNS lookups are also working.  It is, of course, possible that there is a firewall that prevents you from talking to web servers on port 80 and that you have to use a proxy server.  This firewall could potentially be at your ISP, but I think that's unlikely.  It could also be on your router, but then you should probably know it's there smile

Do you use a proxy server from your GUI browser?  If so, put the same settings into elinks.

If you have netcat installed on your desktop machine, you could try:
echo -en "HEAD / HTTP/1.0\r\nHost: www.google.com\r\n\r\n" | nc www.google.com 80

to see if you can connect to Google's web site.  That should output something like:

HTTP/1.0 200 OK
Cache-Control: private, max-age=0
Date: Thu, 28 May 2009 14:49:48 GMT
Expires: -1
Content-Type: text/html; charset=ISO-8859-1
Set-Cookie: PREF=ID=bcd1f930d8472cde:TM=1243522188:LM=1243522188:S=9f4L1222btBLc-Uj; expires=Sat, 28-May-2011 14:49:48 GMT; path=/; domain=.google.com
Server: gws

I it takes a long time and then prints out a "Connection timed out" message, then there's definitely something blocking port 80.

nina wrote:

I then did: man elinks     Yes, man elinks is there.
q put me back to root prompt. I then did: elinks   It displayed.
I fed elinks the URL HTTP:/www.google.com , pressed enter, and a new screen displayed, showing only "Making connection" And nothing else happens.

Just in case that wasn't a typo, make sure you use a lowercase "http" and two slashes.  i.e. http://www.google.com

nina wrote:

At the top of the screen one can access menus: File, View, Link, etc.
But the connection isn't made.
I offered another URL: same result.
So to put this as politely as I can: why am I not connecting if not because my router's not letting me out because I'm not logged on?

Let me ask my question again smile  You don't need to log on to the router in order to browse from a GUI browser, right?  So why should you when you try from the console?

nina wrote:

Sidux (my OS) frowns on users going online as root. I haven't asked, but could there perhaps be a built-in prevention which one has to explicitely over-ride?

It's possible, I think, but highly improbable.  You'd have to ask on the Sidux mailing lists/forums.

nina wrote:

Thanks, all. Any patience left for further suggestions? This is all rocket surgery to me.
nina

My first guess, given what you've said in this message, is that you need to configure the proxy settings in elinks.

Thank you all very much for your friendly and thoughtful replies.
Responding to Wodin.

I am not using a proxy server.
Two machines running on my desk (connected to the same router) are, by default, allowed by my router to pass to the web.
On this third machine (the one giving me grief), even with X-server running, I must log in to LuCi b/4 being allowed to pass.
I don't appear to have netcat installed.

There's some very small glitsch in my sidux system, methink. And now I think I'll stop trying your patience, and file a query with sidux. I hope /expect to come back and report success shortly.

nina

nina wrote:

Two machines running on my desk (connected to the same router) are, by default, allowed by my router to pass to the web.
On this third machine (the one giving me grief), even with X-server running, I must log in to LuCi b/4 being allowed to pass.

OK, I've never used LuCi, so I didn't know it had this functionality.
In that case, you could try logging in to the router using elinks.  (I'm guessing you use Firefox or something like that to log in to LuCi normally.)
If elinks doesn't work for some reason, you could try to run Firefox on your desktop, but display it over the network on one of your other machines.
e.g. on one of the other machines that is running an X server, start up a terminal and run: "ssh -X desktopmachine" and log in.  Then at the command line, run "firefox" and the window should pop up on the machine you're sitting at, even though Firefox is running on the "desktopmachine" without the X server running on "desktopmachine".

This might not work, depending on your sshd configuration, though.

The discussion might have continued from here.