DaemonForums  

Go Back   DaemonForums > Miscellaneous > General software and network

General software and network General OS-independent software and network questions, X11, MTA, routing, etc.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 15th July 2017
sacerdos_daemonis's Avatar
sacerdos_daemonis sacerdos_daemonis is offline
Real Name: Will forever be a secret.
Spam Deminer
 
Join Date: Sep 2014
Posts: 283
Default How do routers work?

I would like to expand my very meagre knowledge about routers to understand a situation I have. This is not a support question, but mearly a querry for information.


Because of the nature of the Chinese internet, in order to use Linux, BSD or Apple a router must be used unless connecting to a LAN. (An indirect connection through someone else's router/server.) The reason being the government has made the internet accessable only after entering a name and passcode. However the software was written specifically for Windows. Any other OS cannot access the internet. Thus, the need for a router. Everything was fine until a few months ago when I moved to another city. After plugging into the school's connection a problem started and has continued to this day, despite an upgrade and moving to yet another city. After the initial connection to that LAN my .Xauth file developed a bad exit command. My "interesting" situation is thus:

When connected directly to the internet:
- After entering startx the GUI takes minutes to load.
- After exiting the GUI it takes minutes before the command line becomes available to enter the shutdown command.
- Some websites, such as Deviantart and Linux Questions cannot be accessed.

When connected to the internet through a router:
- The system works normally.
- No problem accessing the aforementioned websites.


I have two questions:
1. I understand the most basic idea of how a router works, but how does it circumvent a problem that affects non-internet functions, like startx?
2. Or does a router simply block some evil government mines in the water of the internet?
Reply With Quote
  #2   (View Single Post)  
Old 16th July 2017
Beastie Beastie is offline
Daemonology student
 
Join Date: Jan 2009
Location: /dev/earth0
Posts: 335
Default

Quote:
Originally Posted by sacerdos_daemonis View Post
a problem that affects non-internet functions, like startx?
It very much has to do with "internet functions" as the entire X system is based on a server-client model originally meant to be used over TCP/IP networks.

$ startx is just a long wrapper script that runs many (mostly unneeded) commands. Try running $ xinit -- -nolisten tcp -tst instead of $ startx. Most people shouldn't need anything else.

Quote:
Originally Posted by sacerdos_daemonis View Post
Or does a router simply block some evil government mines in the water of the internet?
Unless it has an inbuilt firewall (which most consumer grade routers do), routers shouldn't be blocking anything. All they do is forwarding packets between networks, i.e. routing.
Most probably, the authentication process sends some signature packets that allow you to access the Internet and that would not normally be sent by an operating system otherwise.
__________________
May the source be with you!
Reply With Quote
  #3   (View Single Post)  
Old 16th July 2017
e1-531g e1-531g is offline
ISO Quartermaster
 
Join Date: Mar 2014
Posts: 628
Default

Quote:
The reason being the government has made the internet accessable only after entering a name and passcode. However the software was written specifically for Windows. Any other OS cannot access the internet.
Next question should be: What protocol does this close source software implement? Is this a standardized (PPPoA or PPPoE (Point To Point Protocol over Ethernet)) protocol? If not maybe somebody reverse-engineered protocol and written FOSS implementation for Unix-like operating systems?

Aside from that I see that sometimes OpenBSD TCP connections hang for a few seconds, when I tell that I want or don't want to use some network interface (I mean ifconfig <interface> up or down). Probably this is related to ongoing modernization of the OpenBSD network stack. Some software uses TCP as IPC (inter-process communication), but instead it should use Unix domain socket provided network communication is not required.
__________________
Signature: Furthermore, I consider that systemd must be destroyed.
Based on Latin oratorical phrase

Last edited by e1-531g; 16th July 2017 at 06:13 AM.
Reply With Quote
  #4   (View Single Post)  
Old 16th July 2017
sacerdos_daemonis's Avatar
sacerdos_daemonis sacerdos_daemonis is offline
Real Name: Will forever be a secret.
Spam Deminer
 
Join Date: Sep 2014
Posts: 283
Default

Quote:
Originally Posted by Beastie View Post
Try running $ xinit -- -nolisten tcp -tst instead of $ startx.
I'll experiment with that when I get home in a couple weeks.

Quote:
Unless it has an inbuilt firewall (which most consumer grade routers do), routers shouldn't be blocking anything. All they do is forwarding packets between networks, i.e. routing.
It is good to know my understanding of routers was not wrong. Thanks.
Reply With Quote
  #5   (View Single Post)  
Old 17th July 2017
e1-531g e1-531g is offline
ISO Quartermaster
 
Join Date: Mar 2014
Posts: 628
Default

I don't have experience with PPPoE protocol, but if I was you, I would read this first:
Code:
man npppd
man pppd
man ppp
man pppoe
__________________
Signature: Furthermore, I consider that systemd must be destroyed.
Based on Latin oratorical phrase
Reply With Quote
  #6   (View Single Post)  
Old 17th July 2017
sacerdos_daemonis's Avatar
sacerdos_daemonis sacerdos_daemonis is offline
Real Name: Will forever be a secret.
Spam Deminer
 
Join Date: Sep 2014
Posts: 283
Default

Thanks for the advice.
Reply With Quote
  #7   (View Single Post)  
Old 28th August 2017
rons's Avatar
rons rons is offline
Snoozing
 
Join Date: Oct 2015
Posts: 69
Default

Maybe for some reason X cannot resolve its own hostname? Without the router, this may not be happening, and may cause X to wait for it (for about that long). You could try manually setting the host info.
Reply With Quote
  #8   (View Single Post)  
Old 28th August 2017
rons's Avatar
rons rons is offline
Snoozing
 
Join Date: Oct 2015
Posts: 69
Default

The use of Windows IS interesting. Of course a closed source system would be what the govt would want - to hinder work-arounds. This kind of implies a lot of help from Microsoft.

I seem to recall a few years back, MS was promoting the idea of a mandatory single sign-in to access the internet. That would probably put them in the driver's seat, for the reason mentioned in my first sentence.

Of course with most of the world's PCs already Windows, they're already in the "driver's seat" LOL

Last edited by rons; 28th August 2017 at 01:39 PM.
Reply With Quote
  #9   (View Single Post)  
Old 28th August 2017
sacerdos_daemonis's Avatar
sacerdos_daemonis sacerdos_daemonis is offline
Real Name: Will forever be a secret.
Spam Deminer
 
Join Date: Sep 2014
Posts: 283
Default

Quote:
Originally Posted by rons View Post
The use of Windows IS interesting. Of course a closed source system would be what the govt would want - to hinder work-arounds. This kind of implies a lot of help from Microsoft.
Although true, in this case the main, or only, reason is almost no one in China knows there are other operating systems. When I tell people I do not use Windows the usual answer is an incredulous "How does your computer work?" The government sees no need to make the internet available to the tiny number of people not using THE OS.
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Security Multiple DoS vulnerabilties in Cisco routers and switches J65nko News 0 13th April 2013 10:32 AM
Security Security alert for D-Link routers J65nko News 0 6th February 2013 12:12 PM
Security 4.5 million Brazilian routers hacked J65nko News 0 3rd October 2012 12:58 PM
Security Huawei's routers of vulnerability J65nko News 1 10th August 2012 08:10 AM
WPA Not working on some routers? xmorg FreeBSD General 3 30th April 2011 04:36 PM


All times are GMT. The time now is 07:04 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick