Can Pegaswitch work if it is not running on machine with wired connection?

Discussion in 'Switch - Hacking & Homebrew' started by edepot, Nov 24, 2017.

  1. edepot
    OP

    edepot Member

    Newcomer
    21
    1
    Oct 12, 2017
    United States
    Switch: Uses Wifi for internet connection
    Linux on Windows: Uses Wifi for internet connection
    Third machine: runs access point that offers wifi connection to internet

    Is Pegaswitch able to run on that Linux on Windows machine and allow Switch to work with homebrew?

    If Linux on Windows machine installs Pegaswitch, it will try to offer DNS service over Wifi right?
    But if the Linux on Windows does not itself first connect to the internet, then Pegaswitch will always use 127.0.0.1 as listening port (local loop address can't be used in Switch)
    If Linux on Windows connects first to internet (via wifi), then it can't offer DNS service right?

    Does that mean Linux on Windows machine must have wired connection to internet?

    I am having trouble understanding how I can get Switch on 3.0 to connect.
    Where do you set a global DNS ip to use? I find each DNS setting is within a registered connection.
    But to get a registered connection that uses your own DNS, you must use manual connection and input the SSID manually (plus password).
    But if that is done, you can connect, but it won't get past the dialog checking for internet connection.

    If Pegaswitch is doing DNS service (port 53), that means the Third machine must offer DNS the Pegaswitch DNS IP? Odd.

    Stuck when Switch is in the Dialog with "Console -> Network Device -> Internet"
    The Third machine offers an IP so Console and Network Device becomes blue.
    However it tries to go to Internet (fails because I am trying to use Linux on Windows to offer DNS service, and it won't be able to check internet?)

    How do you get pass this dialog so that Linux on Windows can provide the code to initialize Switch? Switch is getting stuck on the dialog before I can even go into System Update to try to check version.
     
    Last edited by edepot, Nov 24, 2017
  2. machinoman

    machinoman GBAtemp Regular

    Member
    109
    83
    Feb 12, 2011
    United States
    PegaSwitch doesn't hijack the networks DNS settings, you will have to edit the connection settings on the Switch to point to the IP address PegaSwitch comes up with. Since PegaSwitch is to be run on a network, it will use the local IP address of the machine it is running on, usually something like 192.168... or sometimes 10.something. For the Switch connection settings, set it up to connect to the same network the PegaSwitch machine is running on; it doesn't matter if it has internet access or not, then edit the connection's DNS settings to manually point to the PegaSwitch IP.
     
    Last edited by machinoman, Nov 25, 2017
  3. edepot
    OP

    edepot Member

    Newcomer
    21
    1
    Oct 12, 2017
    United States
    Well, something is wrong, because Pegaswitch doesn't get any response from the Switch.
    Linux on Windows is running inside Windows 10. Which means Windows 10 has master control over linux right?
    Let's say Linux on Windows is using Wifi to connect to an access point (lets say 192.168.1.100)
    How can Pegaswitch offer DNS service over the Wifi? It would have to make Linux on Windows a Wifi mobile hotspot, which can't happen because it is already using Wifi as a client.
    Plus Windows 10 prevents anyone from setting up a Wifi mobile hotspot if you use a wired connection.

    Are you saying Pegaswitch will offer DNS service over the 192.168.1.100 through the Access point? but Switch will connect to the Access Point but is able to go through the Access Point and talk to DNS service inside the Linux on Windows? Tried it a few times with firewalls off on both the Access Point (actually a mobile hotspot) and the Windows 10 but didn't work. Is there a Linux on Windows Firewall that needs to be changed as well (using linux commands?)

    This is TOO COMPLICATED! Someone has got to setup an internet connected server and offer the pegaswitch DNS service for every switch and homebrew loading. Someone already volunteered in another thread but not sure if it is still going
     
  4. machinoman

    machinoman GBAtemp Regular

    Member
    109
    83
    Feb 12, 2011
    United States
    That was me, I believe, although mine doesn't run homebrew really. It just resets the time to July 11th so that people can activate the hidden golf game:

    DNS - 97.74.232.2
     
  5. lembi2001

    lembi2001 GBAtemp Regular

    Member
    228
    179
    Dec 29, 2015
    You are misunderstanding how DNS settings work.

    You do not need to setup a hotspot or anything of the sort. Simply run Pegaswitch to get a DNS address on screen, on your switch manually edit your connections settings to have the DNS server set to the IP address that Pegaswitch is displaying and that's it.

    Wether the machine running Pegaswitch is wired or not is irrelevant as you are telling the switch that in order for it to resolve hostnames (such as google.co.uk or facebook.com) then it needs to look at the PegSwitch address
     
  6. edepot
    OP

    edepot Member

    Newcomer
    21
    1
    Oct 12, 2017
    United States
    Thanks for the help, I think the Switch homebrew is not as simple as the PSP. The instructions don't go into the firewall settings, connection variations, Switch wifi setting procedures, etc. It just assumes people will automagically get the switch to connect to the machine running pagaswitch.

    Here are the problems that can arise... 2 cases.

    Case 1 (Switch talks to Pegaswitch through an access point):
    Simply manually setting the DNS on the Switch won't work. The Switch must open a browser first and try to load a page with the exploit. If you manually connect to your access point to get an IP, the access point will offer DNS service to the Switch (with whatever DNS entries it was set with or taken from the ISP). If you then edit the DNS for that connection, it will already have gotten an IP address but it won't open a browser unless you do something on the Switch. What do you do? Try to update? If you try to update, will the computer running Pegaswitch and connected also to the access point offer DNS to the Switch? Can Pegaswitch talk to the switch through the access point? See the problem? firewall settings for access point, computer running Pegaswitch must be done right.

    Case 2 (Switch talks to Pegaswitch computer directly over Wifi):
    If a computer running Linux on Windows is running pegaswitch, and there is no access point, it must offer a mobile hotspot, or there is no way for the Switch to talk to the computer. The problem arising here is that IF the computer offering the mobile hotspot is not actually connected to the internet somewhere using a cellular or PoP or ethernet, it will offer 127.0.0.1 over the mobile hotspot. If switch sees that it will try to connect to itself instead of the pegaswitch computer. Now here comes the big problem. Windows 10 purposely disables mobile hotspot feature if you are using PoP (dialup through copper or broadband). The Switch can't talk to your pegaswitch if the pegaswitch computer is not offering a WiFi hotspot (which Windows 10 prevents). In earlier version of Windows, you could do all these edits via a command shell to reenable mobile hotspot feature, but Microsoft seems to purposely disable it through each update. Just search "Tuning on mobile hotspot on Windows 10". All the solutions DON'T work because Microsoft is actively crippling the feature with each patch. How does this relate to the Switch? If you don't have an access point, the computer must offer mobile hotspot so the Switch can talk to it. Linux on Windows I running inside Windows 10, so Windows 10 has master control over the Wifi Hotspot feature. There is also the problem with firewall on the Windows 10 (is there one under linux too? if it is linux on Windows).

    Also, the interface for Windows 10 is just terrible when changing settings. Windows 10 is just a layer above UI from previous versions of windows. I am surprised how complicated it is at this age.

    Nobody mentioned in the tutorial:
    How many computers they have.
    If they have an access point hardware.
    How they connect to the internet.
    What is running on each machine.
    What firewall settings.
    How does the Switch get to the pegaswitch

    I am surprised anyone got it working.

    I think the only solution is to buy a linux computer that has Wifi and somehow get Linux to offer Wifi mobile hotspot. Then try to get Switch to connect to the linux computer to get online. But run pegaswitch on the same linux computer offering DNS. Otherwise, nobody is stating what their setup are to get Switch to run homebrew. Also, I would guess linux would need to connect via dial up to the internet first, or it will try to offer 127.0.0.1 to Switch over the wifi.

    Is there something I am missing here? Some misunderstanding of the instructions?
     
  7. machinoman

    machinoman GBAtemp Regular

    Member
    109
    83
    Feb 12, 2011
    United States
    I agree that the Windows 10 method seems extremely difficult. Some get it their first try, others spend days, depending on various characteristics of the host machine. I have found VirtualBox/VM method to be relatively simple, and have come to despise the Windows 10 version of Ubuntu for various reasons, the most significant of which is lack of support for various packages such as Postgres.
     
  8. lembi2001

    lembi2001 GBAtemp Regular

    Member
    228
    179
    Dec 29, 2015
    OK, think there are some issues in what you are explaining here.

    Let's first cover the basics.

    How are you connecting to the internet? From what you have described, you don't have a wireless router or similar. What you have described is a Single machine with Internet access that is running as a wireless hotspot for all other devices. Is this correct?