2025 m. spalio 12 d., sekmadienis

WireGuard Guide for Ubuntu

WireGuard Complete Guide for Ubuntu
🔒 WireGuard Complete Guide
Ubuntu Server Setup & Configuration
1 🔄 Update System

Always start by updating your system packages to ensure you have the latest security patches and dependencies:

sudo apt update && sudo apt upgrade -y
💡 Tip: The -y flag automatically confirms the upgrade prompt. Remove it if you want to review packages before upgrading.
2 📦 Install WireGuard

Install WireGuard and required tools:

sudo apt install wireguard wireguard-tools -y

For Ubuntu 18.04 and earlier, you may need to add the PPA first:

sudo add-apt-repository ppa:wireguard/wireguard sudo apt update sudo apt install wireguard wireguard-tools -y
3 🔑 Generate Keys

Generate private and public key pairs:

wg genkey | sudo tee /etc/wireguard/private.key sudo chmod 600 /etc/wireguard/private.key sudo cat /etc/wireguard/private.key | wg pubkey | sudo tee /etc/wireguard/public.key
⚠️ Security Note: Keep your private key secure! The chmod 600 command ensures only root can read the private key.
4 ⚙️ Configure WireGuard

Create and edit the WireGuard configuration file:

sudo nano /etc/wireguard/wg0.conf

Add the following configuration (example for server):

[Interface] # Server configuration PrivateKey = <your_server_private_key> Address = 10.8.0.1/24 ListenPort = 51820 SaveConfig = true # Enable IP forwarding (for server/gateway setups) PostUp = echo 1 > /proc/sys/net/ipv4/ip_forward PostUp = iptables -A FORWARD -i wg0 -j ACCEPT PostUp = iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE PostDown = iptables -D FORWARD -i wg0 -j ACCEPT PostDown = iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE [Peer] # Client 1 PublicKey = <client_1_public_key> AllowedIPs = 10.8.0.2/32 # Optional: PresharedKey for additional security # PresharedKey = <preshared_key> [Peer] # Client 2 PublicKey = <client_2_public_key> AllowedIPs = 10.8.0.3/32
📝 Configuration Notes:
  • Address: The VPN IP address for this interface
  • ListenPort: UDP port WireGuard listens on (default: 51820)
  • SaveConfig: Automatically save runtime configuration
  • AllowedIPs: IP ranges that can be routed through this peer
5 🌐 Enable IP Forwarding (Server Only)

For server/gateway setups, permanently enable IP forwarding:

sudo nano /etc/sysctl.conf

Uncomment or add this line:

net.ipv4.ip_forward=1

Apply the changes:

sudo sysctl -p
6 🎮 Manage WireGuard

Start WireGuard:

sudo wg-quick up wg0

Stop WireGuard:

sudo wg-quick down wg0

Enable on Boot:

sudo systemctl enable wg-quick@wg0

Disable Autostart:

sudo systemctl disable wg-quick@wg0

Check Status:

sudo systemctl status wg-quick@wg0
sudo wg show

Restart After Config Changes:

sudo wg-quick down wg0 && sudo wg-quick up wg0
7 🔥 Configure Firewall

If using UFW (Ubuntu's default firewall), allow WireGuard port:

sudo ufw allow 51820/udp

Allow forwarding (if acting as server):

sudo nano /etc/ufw/before.rules

Add these lines at the beginning (after the header comments):

# NAT table rules *nat :POSTROUTING ACCEPT [0:0] -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE COMMIT

Also edit UFW's sysctl settings:

sudo nano /etc/ufw/sysctl.conf

Ensure this line is uncommented:

net/ipv4/ip_forward=1

Reload UFW:

sudo ufw reload
🔧 Troubleshooting

Check Logs:

sudo journalctl -xe | grep wireguard

Verify Interface:

ip a show wg0

Test Connectivity:

ping 10.8.0.1

Check Active Connections:

sudo wg show wg0 latest-handshakes

✅ Quick Command Reference

🚀 Start/Stop
wg-quick up wg0
wg-quick down wg0
💾 Auto-start
systemctl enable wg-quick@wg0
systemctl disable wg-quick@wg0
📊 Monitor
wg show
systemctl status wg-quick@wg0
⚙️ Configure
nano /etc/wireguard/wg0.conf
wg-quick down wg0 && wg-quick up wg0
🎉 Setup Complete! Your WireGuard VPN is now configured. Remember to:
  • Keep your private keys secure
  • Regularly update your system
  • Monitor connection logs for unusual activity
  • Document your peer configurations

2025 m. rugsėjo 5 d., penktadienis

AI stuff

https://github.com/upstash/context7  - Naujojamas patikrinti naujausias bibliotekas

 https://www.youtube.com/watch?v=xOO8Wt_i72s&ab_channel=PatrickEllis
 - claude mcp

 

https://github.com/microsoft/playwright-mcp
playwright install 
npx playwright install  install chrome 

 

 

Chrome AI:

https://github.com/GoogleChrome/chrome-extensions-samples
chrome://on-device-internals/

https://developer.chrome.com/docs/extensions/get-started/tutorial/hello-world

 

 https://googlechromeai2025.devpost.com/resources

 

 https://groups.google.com/u/1/a/chromium.org/g/chrome-ai-dev-preview/c/4Xeuq3Px9HA

https://developer.chrome.com/origintrials/#/trials/active 

 

 Model data; chrome://on-device-internals/

 

Step 1: Force Download via Components Page

This is the most reliable method:

  1. Go to: chrome://components/
  2. Find: "Optimization Guide On Device Model"
  3. Click: "Check for update" button
  4. Wait for it to download (you'll see the version number update)
  5.  

 

  1. Monitor the download:
    • Open a new tab: chrome://on-device-internals
    • Go to the "Model Status" tab
    • You should see Gemini Nano downloading
  2. Wait 5-15 minutes for download to complete
  3. Verify it's ready:
await LanguageModel.availability();  // Should return 'available'
 
const session = await LanguageModel.create({ outputLanguage: 'lt' });
const result = await session.prompt('Parasyk haiku apie kodavimą');
console.log(result); 

2025 m. rugpjūčio 15 d., penktadienis

2025 m. gegužės 6 d., antradienis

Visual studio code regex search

If we want to find meniu, that has has some particular text

For example

<openign tag
some text
name="anchor"

 
It requires shift+Enter at the end to work

<menuitem\b[\s\S]*?\bname="My Timesheets[^"]*"

<menuitem\b[\s\S]*?\bgroups="group_hr_timesheet[^"]*"

<menuitem\b[\s\S]*?\bname="Timesheets[^"]*"

2025 m. balandžio 17 d., ketvirtadienis

Kelionės

Bendra info:

https://cafeandcowork.com - Coworking places
https://ryanestrada.com/learntoreadkoreanin15minutes/ - Learning Korean alphabet

Korea

National Foundation Day in Korea, celebrated on October 3rd, commemorates the legendary founding of the first Korean kingdom, Gojoseon, by Dangun in 2333 BCE.

The highest peak in Korea is Hallasan (Mount Halla), located on Jeju Island. Hallasan rises to 1,950 meters.

Korean (Hangul) is the official language.

Arrival card can be filled online to save time.

Apps:
Navigation - Naver Map
Taxy: Uber

Coworking:

Coworking spaces can be found on Navel maps by searching: studycaffe or 스터디 카페

https://www.behongli.com - Very nice coworking place in Behongli

https://cafeandcowork.com/seoul/

https://www.digitalnomadskorea.com/post/best-coworking-spaces-seoul



Seul

Foods:

Somaek is a popular South Korean beer cocktail made by mixing soju and beer, typically a lager. The name comes from "soju" (소주) and "maekju" (맥주, beer)
 
Bibim-naengmyeon (비빔냉면) is a popular Korean dish of cold, chewy noodles mixed with a spicy, sweet, and tangy sauce, typically enjoyed during hot weather-much like Lithuanians eat šaltibarščiai (cold beet soup) to cool down in summer. The name means "mixed cold noodles": bibim = mixed, naengmyeon = cold noodles.

Tteokbokki: Spicy Korean Rice Cakes
Tteokbokki (떡볶이) is a classic and beloved Korean street food made from chewy rice cakes simmered in a fiery, sweet, and savory chili sauce. Sometimes transliterated as "Tampuki" in other languages, this dish is instantly recognizable for its bold red color and comforting, addictive taste.

Busan
Gamcheon Village - village created in Korea war when people migrated, after retaking Seul people moves out busat, and left towns empty.
Haeundae Blueline

Park Tour

Jeju:
 

Japan

Hiroshima

https://dive-hiroshima.com/en/information/wifi-area/ - Wifi areas

 

Osaka

Taivanas

 

https://www.likeitformosa.com  - English Walking Tours
https://en.youbike.com.tw/ - Važinėjimas dviračiu (reikalingas Taiwano numeris) 

Belief:

Good grades good life


Liuqiudrifting ball" or "island chain" Xiaoliuqiu - Lambai Island
 

Kaohsiung  -  "high hero"

Amitabha Buddha statue

Taipei

To Study Languages -  NTNU Universitetas.

Meetup groups 

 

Tainan

https://www.twtainan.net

 

Kaohsiung

https://khh.travel/en/attractions/must-visit
https://khh.travel/en/attractions/map

 

What to do - 
https://www.travel.taipei/

https://tw.forumosa.com/ 

Renting info

https://www.roc-taiwan.org/lt_en/post/760.html - Mokymasis Taiwane kalbos, aplikacija iki kovo 31

 

Nuomos svetaines:
https://www.591.com.tw/#

https://www.booking-wise0.com.tw

https://myroomabroad.com


Tailandas

https://www.agoda.com/

 

 

Svetainės pasiskaitymui


https://www.nomadlyf.com/muscat/guide
https://nomadpub.com/tel-aviv-fors-againsts/






Turkija:


https://coliving.com/spaces/fec98brz

https://nomads.com/coworking/istanbul - Žemėlapis

http://sahibinden.com - Nuoma Turkijoje veikia tik su vpn

Graikija


Gidas:

Ko vengti:
https://www.ratepunk.com/blog/post/places-to-avoid-in-athens-safety-guide

Transportas:

https://www.hellenictrain.gr/en - Traukiniai

https://www.rome2rio.com/ - Įvairūs būdai

Žemėlapis
https://hoodmaps.com/athens-neighborhood-map

 

Apratamentai:

https://coliving.com/greece

https://mobee-house.com/apartments/

 

Skrydžiai:

https://www.skyscanner.net/


Website to rent:

https://www.spitogatos.gr/

https://www.theblueground.com/furnished-apartments-athens-greece


Guides:

https://www.twoticketsanywhere.com/digital-nomad-athens/ - good


https://localnomads.com/digital-nomad-guide/athens-greece/

https://www.amysuto.com/desk-of-amy-suto/working-remotely-in-athens-greece




Bendri:

https://coliving.com/

https://www.numbeo.com/cost-of-living/gmaps.jsp - Kiek kainuoja pragyvenimas


WhatsApp Groups:

https://docs.google.com/spreadsheets/d/1eNsQI2yyt4q06JEZIL0INflROZ4aOqSXfu9Ni5mQm1I/edit?gid=0#gid=0