Listing posts

Displaying posts 6 - 10 of 288 in total
Bind programs to a specific network interface attachment
mouse 2278 · person cloud · link
Last update
2022-10-28
2022
10-28
«eg: encapsualte vpn in a netns»
1
2
3
4
5
6
7
8
9
10
11
12
13
# create a new network namespace:
ip netns add test_ns

# exclusively assign an interface to the namespace
ip link set eth0 netns test_ns

# run commans inside the namespace:
ip netns exec test_ns    ip link set eth0 up  # bring up interface
ip netns exec test_ns    dhclient eth0        # assign IP via dhcp

# test network in the namespace
ip netns exec test_ns    ping www.google.com
ip netns exec test_ns    firefox

Tutorial su adkubuntu

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# enable forwarding
sysctl -w net.ipv4.ip_forward=1

# create the network namespace
ip netns add chrome

# create the virtual nic and it's peer
ip link add chrome type veth peer name chrome-peer

# assign the peer to the network namespace
ip link set chrome-peer netns chrome

# assign an ip address
ip addr add 192.0.2.1/24 dev chrome

# bring up interface
ip link set chrome up

# similar network setup for network namespace
ip netns exec chrome ip link set lo up
ip netns exec chrome ip addr add 192.0.2.2/24 dev chrome-peer
ip netns exec chrome ip route add default via 192.0.2.1
ip netns exec chrome ip link set chrome-peer up

# allow forwarding and add enable NAT
iptables -I FORWARD -s 192.0.2.0/24 -j ACCEPT
iptables -t nat -I POSTROUTING -s 192.0.2.0/24 -o tun1 -j MASQUERADE

# pop a shell in the namespace
ip netns exec chrome bash

# check that you're in the namespace
ip netns identify

# run the browser as your local user
runuser -u Barry google-chrome

Source: Stackexchange, ip netns manpage

See also: SuperUser, LD_PRELOAD fix via bind.c


~~~ * ~~~

Game streaming services
mouse 66 · person cloud · link
Last update
2022-10-28
2022
10-28
«gioco online in streaming via web/browser»

Services

Tools


~~~ * ~~~

Useful Android apps
Last update
2022-10-25
2022
10-25
«a collection of must have android apps for many common needs»

General

Media

Games

System

Home automation


~~~ * ~~~

Tasse su conto corrente e deposito
mouse 1342 · person cloud · link
Last update
2022-10-19
2022
10-19
«imposta bollo conti, banca, banche, interessi, tassi»
  1. In ambo i rapporti si paga il 26% sugli interessi maturati.
  2. Importo del bollo statale:
    • Conto corrente: 34.20€ se saldo medio >= 5000€ altrimenti 0€
    • Conto deposito: 0.2% del saldo se giacenza media >= 5000€ altrimenti 1€
      NB: con un tasso lordo di 0.28% si va a patta: 0.0028 * 0.74 - 0.002 =~ 0
      NB: conviene spostarli sul CC se: capitale > 34.2/(tasso * 0.74 - 0.002)

Fonte: ilportafoglio, confrontaconti


~~~ * ~~~

Torta salata al pesto genovese
mouse 70 · person cloud · link
Last update
2022-10-12
2022
10-12
« — »

Ingredienti:

  • 200gr formaggio spalmabile
  • 100gr formaggio grattugiato
  • 1x uovo
  • 1x vasetto di pesto
  • 1x rotolo pasta brisè
  • formaggio filante a pezzetti (scamorza)
  • pomodorini
  • olio evo, sale e pepe q.b.

Procedimento:

  1. incartare lo stampo, stendervi la pasta e forellarla con la forchetta
  2. tagliare i pomodirini e condirli con olio, sale e pepe
  3. amalgamare formaggi, uovo e pesto, ed incorporare poi i pomodorini conditi
  4. infornare a 200 gradi per 30 minuti