Manage Firewall with netsh cmd

D:\>netsh advfirewall firewall show rule name=all | find "Desktop"
Rule Name:                            Remote Desktop - Shadow (TCP-In)
Grouping:                             Remote Desktop
Rule Name:                            Remote Desktop - User Mode (UDP-In)
Grouping:                             Remote Desktop
Rule Name:                            Remote Desktop - User Mode (TCP-In)
Grouping:                             Remote Desktop
D:\>netsh advfirewall firewall show rule name="Remote Desktop - User Mode (UDP-In)"
Rule Name:                            Remote Desktop - User Mode (UDP-In)
----------------------------------------------------------------------
Enabled:                              Yes
Direction:                            In
Profiles:                             Domain,Private,Public
Grouping:                             Remote Desktop
LocalIP:                              Any
RemoteIP:                             Any
Protocol:                             UDP
LocalPort:                            3389
RemotePort:                           Any
Edge traversal:                       No
Action:                               Allow
Ok.
D:\>netsh advfirewall firewall set rule name="Remote Desktop - User Mode (UDP-In)" new LocalPort=3388

How to change Hotspot IP of armbian

e.g. To change ip range of access point to 10.9.1.x/24

1. edit /etc/network/interface.d/armbian.ap.nat

address 10.9.1.1
netmask 255.255.255.0
network 10.9.1.0
broadcast 10.9.1.255

2. edit /etc/dnsmasq.conf

listen-address=10.9.1.1
dhcp-range=10.9.1.50,10.9.1.150,12h

How to forward hostapd (access point) traffics to VPN

/usr/sbin/ip route add default dev [dev.vpn] table [tbl.no]
/usr/sbin/ip rule add iif [dev.ap] table [tbl.no]

[dev.vpn] is a vpn device name. (e.g. tun0)
[dev.ap] is an access point (wlan) device name. (e.g. wlan0)
[tbl.no] is a desired table number which is not reserved, and can be replaced by string name if you add one in /etc/iproute2/rt_tables

to disable VPN forwarding,

/usr/sbin/ip route flush table [tbl.no]

Hotspot on startup, armbian

Issue:
Use armbian-config to create a hotspot. The hotspot is well created, however, doesn’t start on next reboot. Have to go back to armbian-config and manage hotspot to start it again.

Solution:

/lib/systemd/systemd-sysv-install enable hostapd