Quick Configurations

Static Config

Manually

$ sudo service NetworkManager stop
$ ifconfig 
$ sudo ifconfig eth0 10.10.13.37 netmask 255.255.255.0
$ sudo route add default gw 10.10.13.1 dev eth0
$ route -n
$ sudo vi /etc/resolv.conf
domain megacorp.local
search megacorp.local
nameserver 192.168.0.1
$ ping 8.8.8.8
$ nslookup ya.ru
$ sudo systemctl enable ssh --now

netplan

/etc/netplan/*.yaml:

network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      addresses: [10.10.13.37/24]
      gateway4: 10.10.13.1
      dhcp4: true
      optional: true
      nameservers:
        addresses: [8.8.8.8,8.8.4.4]

Apply:

resolvconf

Simultaneous Interfaces

Configure multiple interfaces to work simultaneously:

Inner and Outer Traffic

Route inner traffic to eth0 (lan), Internet to wlan0 (wan):

Wrap All Traffic into VPN in Windows

Check the name of VPN interface (Virtual Ethernet Adapter):

Checks its id (16, it's shown in decimal):

Add a static route to wrap all traffic into the VPN gateway. To achieve that specify VPN interface id in hexadecimal (0x10 in this example) and set higher priority for this route (i.e., lower metric) than default gateway route has:

To delete the route run:

Last updated