This scenario will bridge wlan0 and eth0 interfaces. eth0 is connected to Internet and wlan0 will be used by the access point.
apt install ifupdown systemctl unmask networking systemctl enable networking systemctl restart networking systemctl stop systemd-networkd.socket systemd-networkd networkd-dispatcher systemd-networkd-wait-online systemctl disable systemd-networkd.socket systemd-networkd networkd-dispatcher systemd-networkd-wait-online systemctl mask systemd-networkd.socket systemd-networkd networkd-dispatcher systemd-networkd-wait-online apt purge nplan netplan.io
apt install hostapd vi /etc/hostapd/hostapd.conf interface=wlan0 bridge=br0
#SSID to be used in IEEE 802.11 management frames ssid=<ssid> wpa_passphrase=<password> # Disable broadcasting SSID #ignore_broadcast_ssid=1 # Driver interface type (hostap/wired/none/nl80211/bsd) #driver=nl80211 # Country code (ISO/IEC 3166-1) #country_code=US # Operation mode (a = IEEE 802.11a (5 GHz), b = IEEE 802.11b (2.4 GHz) #hw_mode=g # Channel number channel=1 # Maximum number of stations allowed #max_num_sta=5 # Bit field: bit0 = WPA, bit1 = WPA2 wpa=2 # Bit field: 1=wpa, 2=wep, 3=both auth_algs=1 # Set of accepted cipher suites; disabling insecure TKIP wpa_pairwise=CCMP # Set of accepted key management algorithms wpa_key_mgmt=WPA-PSK # hostapd event logger configuration logger_stdout=-1 logger_stdout_level=3 # Uncomment and modify the following section if your device supports 802.11n ## Enable 802.11n support #ieee80211n=1 ## QoS support #wmm_enabled=1 ## Use "iw list" to show device capabilities and modify ht_capab accordingly #ht_capab=[HT20/HT40][Static SM Power Save][RX HT20 SGI][RX HT40 SGI][No RX STBC][Max AMSDU length: 3839 bytes][DSSS/CCK HT40]
vi /lib/systemd/system/hostapd.service [Unit] Description=Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator After=network.target
[Service] Type=forking PIDFile=/run/hostapd.pid EnvironmentFile=/etc/default/hostapd ExecStart=/usr/sbin/hostapd -P /run/hostapd.pid -B $DAEMON_OPTS ${DAEMON_CONF} ExecStartPost=/sbin/iw wlan0 set txpower limit 100
[Install] WantedBy=multi-user.target
sudo systemctl unmask hostapd sudo systemctl enable hostapd
apt install bridge-utils vi /etc/network/interfaces auto lo iface lo inet loopback auto br0 #iface wlan0 wireless-txpower 1 iface br0 inet static address <ip-addr> network <net-addr> netmask <net-mask> broadcast <brdcst-ip> gateway <gw-ip> bridge_ports eth0 bridge_stp off
vi /etc/modules-load.d/bridge.conf br_netfilter
vi /etc/sysctl.conf net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1 net.ipv6.conf.eth0.disable_ipv6 = 1 net.ipv6.conf.wlan0.disable_ipv6 = 1 net.ipv4.ip_forward = 1
reboot