• 48 Posts
  • 873 Comments
Joined 1 年前
cake
Cake day: 2024年9月13日

help-circle

  • Ok, so if my main router is on 192.168.1.1 and my new OpenWrt router I plan on connecting to VPN is 192.168.1.2, I should set the OpenWrt router’s gateway to 192.168.1.1, set any devices I want on the VPN to use gateway 192.168.1.2, and any devices I don’t want on the VPN should stay on 192.168.1.1, right?

    Would devices on the VPN still be able to access the local network and devices that have 192.168.1.1 as their gateway? I assume it would only route internet bound traffic and the OpenWRT router would be able to just pass through local network traffic the same way as the main router?

    Also, would the OpenWrt router be able to deal with the main router handling DHCP if I configure it to give it a static IP? Will it just know what devices it’s talking to when the main router assigns them their dynamic IPs?

    Sorry for all the noob questions, networking is not one of my strengths.


  • just get a cheap Pi-type device, install OpenWRT, setup your VPN connections, then create a route on your network to point at this new device for whatever you need it for.

    Can I just set its IP address as the default gateway on my devices instead of the main router and expect it to forward everything to the main router through the VPN? Or is there a more complicated setup procedure to get the two routers talking properly?

    I briefly tried to make my server a default gateway in the past but couldn’t get it to work, and I’m generally not super experienced with networking. But that was on a general non-router OS. Does OpenWrt do the gateway and routing/forwarding configuration by itself more than a general Linux OS?


  • Hmm, basically make a container with the VPN client and proxy server, and expose the proxy port through it? Not sure how to route the host server’s traffic through that but I suppose I can just point all the important stuff to the local container’s proxy port. I’ll see if that’s more reliable than modifying the host network configurations. Thanks!

    I’ve also been thinking of switching to Nix so I can just configure it once and rebuild the entire system with all the condigurations at any time without going through manually setting everything back up with individual commands/file edits. Though I’m not sure if that’d be more reliable given it’s broken randomly on Fedora when I didn’t even change any network configurations.






  • My biggest issue with Windows is the lack of control I have of the actual hardware I own. I don’t own my work computer to begin with nor am I entitled to have full control over it so it doesn’t matter.

    I do use WSL, but mainly because I’m more familiar with Bash than Powershell and don’t have to constantly figure out how Powershell does things I already know how to do.

    It’s the same reason I have no problem using my company’s OneDrive for work files when I go out of my way to avoid putting any of my personal data on the cloud. It’s their data and they don’t care so I don’t care either.

    It’s also nice because I can set up a Linux-only file server at home with things like SSHFS and the Windows computer can’t even see it since it has no SSH access doesn’t even support the network share protocol. If I had an SMB share it would show up on my work computer because it autodetects it.


  • parallel, easy multithreading right in the command line. This is what I wish was included in every programming language’s standard library, a dead simple parallelization function that takes a collection, an operation to be performed on the members of that collection, and optionally the max number of threads (should be the number of hardware threads available on the system by default), and just does it without needing to manually set up threads and handlers.

    inotifywait, for seeing what files are being accessed/modified.

    tail -F, for a live feed of a log file.

    script, for recording a terminal session complete with control and formatting characters and your inputs. You can then cat the generated file to get the exact output back in your terminal.

    screen, starts a terminal session that keeps running after you close the window/SSH and can be re-accessed with screen -x.

    Finally, a more complex command I often find myself repeatedly hitting the up arrow to get:

    find . -type f -name '*' -print0 | parallel --null 'echo {}'

    Recursively lists every file in the current directory and uses parallel to perform some operation on them. The {} in the parallel string will be replaced with the path to a given file. The '*' part can be replaced with a more specific filter for the file name, like '*.txt'.










  • My dog chewed a plastic bag containing the special proprietary cables for a computer display/input switch. I think she just wanted the bag and the cables were collateral damage, because she’s never chewed cables on their own before or since.

    They refuse to sell the cables separately so it made the device itself useless unless I buy another one for like $100. Ended up not bothering and giving up on having a peripheral switch because I refuse to give them that much money again just because a $10 set of cables broke and reward their shitty business practices. I just manually switch the actual display and USB cables when I want to control another computer.

    Also blew my mind just how strong a bite force even a small breed dog has. She totally crushed the metal casing surrounding the plug and shattered the plastic molding in the less than one minute she had it. I can’t even do that with my teeth (then again I’ve never tried).