LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-13-2018, 03:18 AM   #1
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Rep: Reputation: 10
Post Enable internet connection via console.


Hello.
In a local network for enable internet connection we must enter an IP address in a browser and then enter username and password for enable internet connection. How about console?

Thank you.
 
Old 11-13-2018, 03:45 AM   #2
Honest Abe
Member
 
Registered: May 2018
Distribution: CentOS 7, OpenSUSE 15
Posts: 342
Blog Entries: 1

Rep: Reputation: 186Reputation: 186
Try with a command line browser maybe ? Lynx/elinks/w3m etc.
Unsure about how they handle sessions/cookies etc though.
 
Old 11-13-2018, 05:22 AM   #3
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: A few
Posts: 4,828

Rep: Reputation: 1435Reputation: 1435Reputation: 1435Reputation: 1435Reputation: 1435Reputation: 1435Reputation: 1435Reputation: 1435Reputation: 1435Reputation: 1435
Do you have to do that from the system that will receive the IP address?

Text browsers as suggested by Honest Abe should work just fine. They do handle cookies and sessions, though not necessarily JavaScript.

There are even ASCII-art browsers such as https://www.ostechnix.com/browsh-a-m...ics-and-video/ (it requires Firefox; I haven't tried it).

Just by the way, if it's not a serial console, you should be able to run a GUI on it.
 
Old 11-14-2018, 10:08 AM   #4
FlinchX
Member
 
Registered: Nov 2017
Distribution: Slackware Linux
Posts: 480

Rep: Reputation: Disabled
You may have a look at the request that's being send and just send the HTTP POST request with username and password using wget or curl. Login info is sensitive, so if it's a multiuser system, make sure you don't leak it to all users.
 
Old 11-16-2018, 11:53 PM   #5
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 10
Quote:
Originally Posted by Honest Abe View Post
Try with a command line browser maybe ? Lynx/elinks/w3m etc.
Unsure about how they handle sessions/cookies etc though.
When I used
Code:
lynx https://www.google.com
then it showed me "Alert!: Unable to connect to remote host.".
 
Old 11-16-2018, 11:56 PM   #6
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 10
Quote:
Originally Posted by FlinchX View Post
You may have a look at the request that's being send and just send the HTTP POST request with username and password using wget or curl. Login info is sensitive, so if it's a multiuser system, make sure you don't leak it to all users.
Can you show me some example?
 
Old 11-17-2018, 09:41 AM   #7
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,058
Blog Entries: 1

Rep: Reputation: 864Reputation: 864Reputation: 864Reputation: 864Reputation: 864Reputation: 864Reputation: 864
If it's a public wifi, there's likely a captive portal. It's easiest to use a GUI browser to deal with those. Even on a pocketchip. Otherwise you'll likely need a text based browser with support for javascript and things. w3m, lynx, links, links2, elinks, several out there. Some support ssl, some support javascript, most pages are not designed for them though. A lot of times I have to change DNS after passing the captive portal for a useful internet connection. AKA /etc/resolv.conf
 
Old 11-18-2018, 11:48 AM   #8
FlinchX
Member
 
Registered: Nov 2017
Distribution: Slackware Linux
Posts: 480

Rep: Reputation: Disabled
Quote:
Originally Posted by hack3rcon View Post
Can you show me some example?
I mentioned a workflow that involves a few steps:

1. capturing the traffic when you're trying to authenticate to your ISP using a web browser

2. finding and understanding the HTTP POST request the browser sends

3. reproducing that with a command line HTTP client

which step is causing you trouble?
 
Old 11-18-2018, 11:49 AM   #9
FlinchX
Member
 
Registered: Nov 2017
Distribution: Slackware Linux
Posts: 480

Rep: Reputation: Disabled
Quote:
Originally Posted by Shadow_7 View Post
A lot of times I have to change DNS after passing the captive portal for a useful internet connection. AKA /etc/resolv.conf
Just FYI, a neat hack is to use Tor as DNS server in such situations.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to connect a netbook via cable via PC via UMTS-stick to the internet JZL240I-U Linux - Software 9 06-03-2015 11:45 AM
problem in connection to console of VM via virsh sanaz Linux - Virtualization and Cloud 11 10-01-2012 06:06 PM
Internet Radio Streaming via shoutcast via linux installed via an ftp server Good Cat Linux - Server 0 03-07-2011 05:35 AM
Installation of Bluetooth Dongle to enable GPRS internet connection leo_2005 Linux - Hardware 2 09-22-2006 07:34 AM
How do I enable internet connection sharing under suse 8.2 pro? bruno buys Linux - Networking 1 11-10-2003 11:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration