Share your PC’s Internet to the Ubuntu Server through SSH

Best case: your PC can SSH into the Ubuntu server

Run this on your PC:

ssh -N -R 127.0.0.1:1080 ubuntu_user@UBUNTU_SERVER_IP

This creates a SOCKS proxy on the Ubuntu server at:

127.0.0.1:1080

Traffic from the Ubuntu server will go through SSH and exit from your PC’s internet connection.

On the Ubuntu server, test it:

curl --proxy socks5h://127.0.0.1:1080 https://ifconfig.me

Other case: Ubuntu server can SSH into your PC

Then run this on the Ubuntu server:

ssh -N -D 127.0.0.1:1080 pc_user@PC_IP
curl --proxy socks5h://127.0.0.1:1080 https://ifconfig.me

More reliable option: use an HTTP proxy through SSH

Run an HTTP proxy on your Windows PC

For example, if you already use one of these apps:

App Common HTTP / mixed proxy port
v2rayN 10809 or similar
Clash Verge / Clash for Windows 7890
NekoRay / NekoBox usually configurable

Use the app’s HTTP or mixed proxy port.

ssh -N -R 127.0.0.1:1080:127.0.0.1:7890 ubuntu_user@UBUNTU_SERVER_IP

 

Disable SmartScreen via Group Policy in Windows 11

Open the Local Group Policy Editor: Press Windows + R, type gpedit.msc into the Run dialog, and click “OK”.

Navigate to the Policy: Go to the following path in the left panel:
Computer Configuration → Administrative Templates → Windows Components → File Explorer
(Note: In some Windows 11 versions, this may be named “Windows Explorer” instead.)

Open the Policy Setting: In the right panel, double-click “Configure Windows Defender SmartScreen”.

Disable SmartScreen: In the window that opens, select the Disabled option and click Apply and then OK to save the changes.

Create an SSH User with a non-interactive Shell

Create the Restricted System User

sudo useradd -r -s /bin/false -m -d /home/proxyuser proxyuser

Set Up Authentication

sudo passwd proxyuser

Configure SSH Daemon

sudo nano /etc/ssh/sshd_config
Match User proxyuser
    AllowAgentForwarding no
    AllowTcpForwarding yes
    X11Forwarding no
    PermitTTY no
    ForceCommand /bin/false

Restart the SSH Service

sudo systemctl restart ssh
# or
sudo systemctl restart sshd

 

Force Administrator Global Elevation via Registry in Windows

If you want every single .exe you launch to attempt to run with your full Admin token by default, you can tweak the registry.

Press Win + R, type regedit, and hit Enter.

Navigate to:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System

Look for the value EnableLUA.

Double-click it and change the Value Data to 0.

Restart your computer.

Install Rust GNU toolchain on Windows

Install MSYS2

  • Download & Install: Download the installer from the official MSYS2 website and run it. Using the default installation path (e.g., C:\msys64) is highly recommended

pacman -Syu
pacman -S --needed base-devel mingw-w64-x86_64-toolchain

Set Up and Configure Rust

rustup target add x86_64-pc-windows-gnu
rustup toolchain install stable-x86_64-pc-windows-gnu
rustup set default-host x86_64-pc-windows-gnu

Create (or edit) a file at %USERPROFILE%\.cargo\config.toml. Add these lines to explicitly tell Cargo which linker and archiver to use; replace C:\msys64 with your actual MSYS2 path if different

[target.x86_64-pc-windows-gnu]
linker = "C:\\msys64\\mingw64\\bin\\gcc.exe"
ar = "C:\\msys64\\mingw64\\bin\\ar.exe"

 

Blank Screen on Ubuntu Server

Blank screen after idle: setterm --blank 1 (the number is the timeout in minutes)

Blank screen immediately: setterm --blank force

To turn the screen back on, run setterm --blank poke

Permanent Solution (Automatic on Boot)

sudo nano /etc/systemd/system/setterm-blank.service
[Unit]
Description=Blank screen after 1 minute idle
After=multi-user.target

[Service]
Type=oneshot
Environment="TERM=linux"
ExecStart=/usr/bin/setterm --blank 1 --term linux
StandardOutput=tty
TTYPath=/dev/tty0

[Install]
WantedBy=multi-user.target
sudo systemctl enable setterm-blank.service
sudo systemctl start setterm-blank.service

Or

sudo nano /etc/default/grub

Find the line GRUB_CMDLINE_LINUX_DEFAULT and add consoleblank=60 (60 = seconds before blanking):

GRUB_CMDLINE_LINUX_DEFAULT="quiet consoleblank=60"
sudo update-grub
sudo reboot

 

Install Chocolatey on Windows

Set-ExecutionPolicy Bypass
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

 

Capture All Traffic to and from a Specific IP Address in Wireshark

ip.addr == 104.19.230.21
  • ip.addr matches packets where the source OR destination IP is 104.19.230.21.

  • It works for both IPv4 and IPv6 (though here it’s IPv4).

You could also use:

ip.src == 104.19.230.21 or ip.dst == 104.19.230.21
  • If you want to see only traffic from that IP (responses to you), use ip.src == 104.19.230.21.

  • If you want only traffic to that IP (your requests), use ip.dst == 104.19.230.21.

Single WordPress Instance with Multiple Domains

Add the following code to your wp-config.php file, right before the line that says /* That's all, stop editing! Happy publishing. */

$domain = array("domain1.com", "www.domain1.com", "domain2.com", "www.domain2.com");
if (in_array($_SERVER['HTTP_HOST'], $domain)) {
    define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST']);
    define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST']);
}

This code dynamically sets the site URL based on how a visitor accesses the site, ensuring both domains work correctly.

Important Considerations:

  • Allow All Domains: If you want to allow any domain pointing to your server, replace the if (in_array(...)) block with just the two define lines, though using the domain array is safer to prevent unwanted access.

  • HTTPS Support: If your site uses HTTPS, change 'http://' to 'https://' in both define statements.

  • Subdirectory Installations: If WordPress is in a subdirectory (e.g., /wp), modify the code accordingly: define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/wp');.

  • Avoid Plugin Conflicts: When testing, temporarily deactivate plugins to check for conflicts.