16 votes

How can I completely and permanently remove the ability to access the internet from a Debian derivative?

The machine will be a laptop.

So let's say I'm doing this on Antix Linux or MX-Linux, which are both based on Debian. I already set up everything that I want. Now I wish to make that installation incapable of accessing the internet ever again -- even if I want it to. However, I wouldn't want to achieve that in a way that will negatively affect any application I might need. How can I do that?

You may be curious about my motivation. It is simple: that machine should be only for writing and nothing more. Maybe I'll use YLINAT, @Areldyb's Timasomo project.

For the purposes of my usage, it is nothing more than an electronic typewriter with a screen. That is a drastic measure but I have ADHD and I need to write. I'm afraid that if I don't do something about it I'll see myself in a difficult situation regarding deadlines. I'll just take the laptop with me to a quiet place and leave the cell phone at home.

Every day I will take my writing off the laptop via USB and back it up.

30 comments

  1. [10]
    slashtab
    Link
    Remove the network card from you pc?

    Remove the network card from you pc?

    18 votes
    1. [9]
      lou
      Link Parent
      I should have clarified that it's a laptop. Can I do that on a laptop? I'm not particularly good at disassembling/assembling stuff.

      I should have clarified that it's a laptop. Can I do that on a laptop? I'm not particularly good at disassembling/assembling stuff.

      3 votes
      1. [7]
        MeckiSpaghetti
        Link Parent
        There is a chance that the internal network adapter can be disabled in the BIOS.

        There is a chance that the internal network adapter can be disabled in the BIOS.

        18 votes
        1. [2]
          Comment deleted by author
          Link Parent
          1. NachoMan
            Link Parent
            Also if the card can't be removed, every laptop I've seen has those wires connected to the wifi module that serve as antenna, clipped on with a little connector. I imagine without those it...

            Also if the card can't be removed, every laptop I've seen has those wires connected to the wifi module that serve as antenna, clipped on with a little connector. I imagine without those it wouldn't do much if anything.

            3 votes
        2. [5]
          ecchi
          Link Parent
          The problem is that it can be enabled again and he wants a solution that even he won’t be able to undo. Even if laptop is dismantled and wifi card removed, and ethernet port disabled physically or...

          The problem is that it can be enabled again and he wants a solution that even he won’t be able to undo. Even if laptop is dismantled and wifi card removed, and ethernet port disabled physically or broken, you could still get a USB to ethernet adapter and get that machine online. If someone really wants to get online, they will.

          I think there could be a way to get rid of network drivers in Linux somehow, so that neither ethernet or wifi works and no usb to ethernet adapters are recognized. Without an internet connection that could be a tricky problem to fix yourself.

          You could also ask someone else to set up a user on this Linux system for you that would not have Internet access. I think this could be done via iptables or something like that. They shouldn’t give up root access and you are done. But even with this solution you can boot from live USB and get online.

          7 votes
          1. [2]
            Comment deleted by author
            Link Parent
            1. TanyaJLaird
              Link Parent
              Yeah, I agree. "Good enough" should be the rule here. Ultimately, there's nothing stopping OP from just using another computer. If they're a university student, there's nothing stopping them from...

              Yeah, I agree. "Good enough" should be the rule here. Ultimately, there's nothing stopping OP from just using another computer. If they're a university student, there's nothing stopping them from just heading to a computer lab and messing around on social media. The point is to make a device that has a similarly difficulty accessing the Internet as finding a different computer to work with. Honestly, simply disabling the wifi in bios should be enough. Give the laptop to a friend or partner. Have them change the bios password and record it. Or, change it to something too long and random to remember and write the password down a few times. Then, place these scraps of paper in a few locations you won't constantly see them, but can be easily addressed. Think bottom of the sock drawer.

              It's important to keep your eye on the ball here. The real goal is to make it so accessing the Internet requires a good 15-30 minutes of effort, whether through elite hacking skill or simply finding another computer. We're not designing a computer for prison inmates; we're just trying to make accessing social media such a pain in the ass it loses its luster.

              11 votes
          2. vord
            Link Parent
            You can often disable USB hardware in BIOS as well. As well as booting anything other than the hard disk. Set the BIOS how you want, then have somebody else set a password for you.

            You can often disable USB hardware in BIOS as well. As well as booting anything other than the hard disk.

            Set the BIOS how you want, then have somebody else set a password for you.

            2 votes
          3. papasquat
            Link Parent
            Yeah, I mean it's a computer. You can get internet access on any x86 machine somehow. Software is completely out of the question, because you could just install a new OS as long as you have access...

            Yeah, I mean it's a computer. You can get internet access on any x86 machine somehow. Software is completely out of the question, because you could just install a new OS as long as you have access to the hardware. The only thing I could think of would be to physically damage all external interfaces. Even then though, you could still solder leads to your USB bus and plug in an external network card.

            I don't really think it's even possible to do what the OP is asking.
            You can certainly make it very hard for a computer to access the internet, but it's never going to be impossible. There will always be a way to modify it to get a network connection as long as the machine is functional.

            2 votes
          4. raze2012
            Link Parent
            This seems to be a discipline thing rather than a failsafe, so I think the bios would be a good first step. If they are getting to the point where they reboot their computer just to break their...

            If someone really wants to get online, they will.

            This seems to be a discipline thing rather than a failsafe, so I think the bios would be a good first step. If they are getting to the point where they reboot their computer just to break their habit, it can escalate to hardware removal.

            If it escalates to a point where OP is going out to a store and spending money to workaround the hardware failure, there are still solutions to prevent this. But they may need a stronger intervention than the internet can give them. You'd need a trusted individual to hold the BIOS password and disable the laptop's network card AND USB ports.

            1 vote
      2. diazc
        Link Parent
        If you want it to be simple enough, take the device to a computer repair shop and ask them to perform the operation for you. I'm sure it'll be a walk in the park for them and should not cost you...

        If you want it to be simple enough, take the device to a computer repair shop and ask them to perform the operation for you. I'm sure it'll be a walk in the park for them and should not cost you very much.

        2 votes
  2. [4]
    mordae
    (edited )
    Link
    This is impossible to do, software-wise. Even if you remove your WiFi card firmware from /lib/firmware, after determining what file your system uses or deleting the relevant kernel module, you can...

    This is impossible to do, software-wise.

    Even if you remove your WiFi card firmware from /lib/firmware, after determining what file your system uses or deleting the relevant kernel module, you can trivially use USB flash to bring in a copy from another system or get the relevant .deb file and reinstall.

    You can remove the WiFi/USB module as other commenters suggested, but if you still have an Ethernet port, you can connect using the LAN cable.

    At last, but not least, you can always plug in your phone using USB cable and (at least on Android, save for situations where your provided decided to block this option and you don't have root) choose to share your phone's network connection with the host computer. It's called tethering.

    As a fellow ADHDer, I suggest you instead:

    • Sit down with some tea and think hard about your motivation and through the consequences. There are actually only a few things in your life you have to do no matter what.
    • Determine whether you actually need to write despite it being incredibly off-putting. Figure out what's the blocker. Is it content? Form? Lack of insight and thus a huge pile of research to do?
    • Get in touch with whoever you write for and figure out if you can do it "for them" and with them in mind. It's usually easier, because your hack yourself by believing this will make your more acceptable as a human being, turning RSD into fuel. Use with caution.
    • Talk with somebody else.

    If you really need a typewriter and nothing else, get FreeDOS without networking and some nineties text editor.

    15 votes
    1. [3]
      lou
      (edited )
      Link Parent
      I should clarify that given my lack of knowledge and competence the removal of essential networking functionality could easily make it impossible for me to recover it without reinstalling the...

      This is impossible to do, software-wise.

      I should clarify that given my lack of knowledge and competence the removal of essential networking functionality could easily make it impossible for me to recover it without reinstalling the entire system.

      I wouldn't take my phone with me to the writing environment, which is not in my home.

      Thank you for your other suggestions regarding ADHD, I shall carefully consider them. I sometimes forget about the importance of good habits and rituals ;)

      FreeDOS sounds really cool. How would I take the file out of FreeDOS? Would it recognize a USB stick?

      7 votes
      1. [2]
        mordae
        (edited )
        Link Parent
        Yes, FreeDOS supports USB sticks. You should even be able to install it on the stick and then be able to boot into your writing environment on most computers. Just make sure not to add any old...

        Yes, FreeDOS supports USB sticks. You should even be able to install it on the stick and then be able to boot into your writing environment on most computers.

        Just make sure not to add any old games. ;-)

        Habits are cool and all, but I find myself to be truly productive only when I honestly care. Sometimes I need to remind myself of what do I care about.

        Also, if you only have issues with certain sites, you can add them to /etc/hosts with 0.0.0.0 as their address to disable access to them from your browser (on Linux).

        3 votes
        1. lou
          (edited )
          Link Parent
          I understand, thanks. On another note... Yeah, motivation is often not enough and ADHD only seems to get worse with age. There are things I knowingly care about very much but I am still incapable...

          I understand, thanks.

          On another note... Yeah, motivation is often not enough and ADHD only seems to get worse with age. There are things I knowingly care about very much but I am still incapable of doing them optimally unless I greatly restrict or alter my environment.

          To give you an example, there is nothing I care about more than my son. That doesn't make sitting through all the tedious steps of fatherhood any easier.

          I fired up FreeDOS on a VM. I like the idea of using something that isn't Linux. It makes it less likely for me to waste time messing with the command line.

          3 votes
  3. lou
    (edited )
    Link
    I should clarify that the task is not as difficult as it seems. Given my lack of knowledge and competence, a significantly technical impediment to restore network capability would be "impossible"...

    I should clarify that the task is not as difficult as it seems. Given my lack of knowledge and competence, a significantly technical impediment to restore network capability would be "impossible" enough for me.

    I didn't wanna remove stuff "randomly" because I might inadvertently break the system.

    6 votes
  4. [5]
    tomf
    Link
    whats the model of laptop?

    whats the model of laptop?

    4 votes
    1. [4]
      lou
      Link Parent
      Although I may acquire a smaller laptop in the future, at the moment I have a Dell Inspiron 15 P39F without a battery.

      Although I may acquire a smaller laptop in the future, at the moment I have a Dell Inspiron 15 P39F without a battery.

      4 votes
      1. tomf
        Link Parent
        you've got the service manual below -- rip that wlan out :) That's the best method.

        you've got the service manual below -- rip that wlan out :) That's the best method.

        4 votes
      2. hamstergeddon
        Link Parent
        If you do plan on getting a smaller one, might I suggest something like an old 2010s-era netbook? Some of the lighter-spec ones are especially awful to use for anything resource-intensive. I had...

        If you do plan on getting a smaller one, might I suggest something like an old 2010s-era netbook? Some of the lighter-spec ones are especially awful to use for anything resource-intensive. I had one that even with the lightest linux distro installed on it was entirely unpleasant to use for even basic web browsing. But using it as a writing machine would've been perfect had I kept it.

        Plus if you can find one w/o an ethernet port all you'd have to do is remove the Wifi card. And if you really wanted to make it a permanent fix, snip the little antennae connectors on the two wires going from the wifi card.

  5. Hollow
    Link
    Strong suggest you look up the Cold Turkey software suite, which specifically prevents blacklisted apps or websites from being open while active (on schedule). It's very thorough at stopping you...

    Strong suggest you look up the Cold Turkey software suite, which specifically prevents blacklisted apps or websites from being open while active (on schedule). It's very thorough at stopping you from cheating.

    4 votes
  6. knocklessmonster
    (edited )
    Link
    Remove network-manager, dhclient, dhcpcd, wireless-tools (I believe) and wpa_supplicant. I believe they still provide ISOs for upgrades, so you still have that option.

    Remove network-manager, dhclient, dhcpcd, wireless-tools (I believe) and wpa_supplicant.

    I believe they still provide ISOs for upgrades, so you still have that option.

    4 votes
  7. hammurobbie
    (edited )
    Link
    Set firewall rules: iptables -P INPUT DROP iptables -P FORWARD DROP iptables -P OUTPUT DROP Edit: Another thing you can do is download something like ProtonVPN, connect to it, turn on the kill...

    Set firewall rules:

    iptables -P INPUT DROP
    iptables -P FORWARD DROP
    iptables -P OUTPUT DROP

    Edit: Another thing you can do is download something like ProtonVPN, connect to it, turn on the kill switch, drop your VPN connection, then delete the app. The kill switch will still be active, and your Internet traffic will be blocked.

    4 votes
  8. Pavouk106
    Link
    Since I run Gentoo and I'm familiar with it, I would recompile my kernel withour network support. Either the whole network stack (which may probably cause problems with software) or better yet...

    Since I run Gentoo and I'm familiar with it, I would recompile my kernel withour network support. Either the whole network stack (which may probably cause problems with software) or better yet just don't compile the drivers for actual HW (either apecific network card or all network cards).

    It's not for beginners, but it should work.

    Another thing is to physically remove the card (if it's add-in card) or physicaly remove the connector (destructively). Or disable it in BIOS and lock the BIOS with a password. These methods won't prevent connecting USB cards/wifi though.

    3 votes
  9. Toric
    Link
    Depending your your level of expertise and willingness to learn a text editor, you might not need to remove internet access at all. Given your goal, simply making web browsing...

    Depending your your level of expertise and willingness to learn a text editor, you might not need to remove internet access at all. Given your goal, simply making web browsing unappealing/impractical might be enough. Have you thought about just not installing a graphical environtment and making this laptop a 'terminal only' laptop? No web browser that can display images, but you can still write with your preferred terminal text editor. (Im a vim affectiannado, but I realize its easier said than done.)

    3 votes
  10. [5]
    Campy
    Link
    It seems obvious, but since nobody has touched on this yet: why not a pen and paper? Not only would that eliminate the possibility for Internet distraction, I find it goes a step further and...

    It seems obvious, but since nobody has touched on this yet: why not a pen and paper? Not only would that eliminate the possibility for Internet distraction, I find it goes a step further and encourages a better writing process. Use a pen, not a pencil, and it will force you to keep writing forward instead of procrastinating by rewriting sentences. After you have it on paper, the task of transcribing will be less intimidating. Just think of it as copying what you wrote, not writing itself. You will inevitably edit your draft to some extent while typing it up, but you might also find that many of the sentences or paragraphs that you were initially unhappy with are acceptable in the context of a completed section. The transcription phase may require a limited distraction environment, but it might not need such drastic measures as you are pursuing now. You can only trick yourself so much, and there are plenty of ways to waste time on a computer without the Internet, e.g. rewriting things that don't need it. Limiting your Internet access is a fair measure to take in creating a good writing environment. However, I encourage you to consider if completely severing the possibility of a connection on your computer is a necessary step or if this project is just a form of procrastination from tackling what actually needs to get done, which is writing. Best of luck to you.

    1 vote
    1. [4]
      lou
      (edited )
      Link Parent
      Oh, I wouldn't wait for the perfect computer to start writing! I do wish improve my productivity but I'm writing already! To clarify, this is not main computer. I have a desktop from which nothing...

      Oh, I wouldn't wait for the perfect computer to start writing! I do wish improve my productivity but I'm writing already!

      To clarify, this is not main computer. I have a desktop from which nothing will be removed. The machine in question is an old, currently unused laptop.

      I considered using pencil and paper. I never did that before. Feels incredibly slow for my ADHD and I have terrible calligraphy. Sometimes I can't read myself.

      I went through every phase since an early age, but I really got into writing with a manual typewriter. I'm not a hipster, I'm just old. Later on I used different models of electric typewriters until I met the love of my life, the IBM Selectric. I progressed to Microsoft Word, which is when my writing process crystallized. I do not write fiction sequentially. I write all the parts that I need in whatever order they come. Only than I realize what belongs in the beginning, middle, or end.

      Essentially, I keep trying to achieve something that feels at once computer and typewriter. That must be the only Linux that doesn't really exist: a system that boots in 15 seconds to a completely self sufficient text editor -- and you can't easily access the rest of the system.

      That said, nothing prevents me from typing my handwritten manuscripts and reordering them as I please. It feels weird for the son of journalists to write without typing. But maybe that's just what I need. It's certainly cheaper than a typewriter!

      1 vote
      1. first-must-burn
        Link Parent
        When I read the top post, I restrained myself from posting this because it's pretty impractical. But given what you wrote here, I thought I would throw it out there with many grains of salt....

        When I read the top post, I restrained myself from posting this because it's pretty impractical. But given what you wrote here, I thought I would throw it out there with many grains of salt.

        https://www.usbtypewriter.com/

        These are manual typewriters retrofit with bluetooth electronics. I have no idea how good they are to use in practice, and they are definitely not cheap, but maybe they would scratch the itch.

        2 votes
      2. [2]
        Campy
        Link Parent
        I'm happy to hear that you are actively writing, and I hope I didn't come across as overly didactic. My comment spoke more to my own experience than yours, and you likely have written more than I...

        I'm happy to hear that you are actively writing, and I hope I didn't come across as overly didactic. My comment spoke more to my own experience than yours, and you likely have written more than I have.

        I think pen and paper is worth trying, though, even as just a supplemental method when you're in a writing funk. It has always given me a new context free from the years of mental baggage associated with tapping at a keyboard.

        To address your main question directly: If you don't mind looking like a mega-hipster, there was a generation of portable word processors that function like typewriter with a small screen that offers basic editing features. I see them in thrift stores frequently, and they are not worth very much these days. Maybe the similarities to traditional typewriters will be appealing to you. The downside is that saving your work would probably involve a floppy disc and an obsolete file format. Perhaps someone else here has a suggestion for how to manage it.
        Here is an example on eBay, although I'm not recommending this model or listing specifically: https://www.ebay.com/itm/194835586795

        1 vote
        1. lou
          (edited )
          Link Parent
          Probably not eBay (shipping usually costs more than the product, and import taxes are very high) but I might be capable of acquiring a cheap Chinese knock off on Ali Express if such a thing exists!

          Probably not eBay (shipping usually costs more than the product, and import taxes are very high) but I might be capable of acquiring a cheap Chinese knock off on Ali Express if such a thing exists!