I've set up ubuntu server (16.04TLS) as Access Point with hostapd and dnsmasq.For internet connection I use my built-in wifi network card (RTLINK) and for Access Point - wifi-usb adapter. Without Wifi-Usb being plugged in there is stable internet connection (I can surf internet with curl). After plugging USb-Stick (Edimax EW-7811Un) in, I can connect my devices to it (it broadcasts access point), but then there is no more any internet connection.What can be a problem? Gateway is 192.168.2.1rc.localiptables -t nat -A POSTROUTING -s 192.168.2.0/24 ! -d 192.168.2.0/24 -j MASQUERADE /etc/network/interfaces    auto loiface lo inet loopbackauto wlx74da382e3878iface wlx74da382e3878 inet statichostapd /etc/hostapd/hostapd.confaddress 192.168.2.1netmask 255.255.255.0auto wlo1allow-hotplug wlo1iface wlo1 inet dhcp ...wpa-settings $ifconfig (wlo1 used for connection to ADSL-Router for Internet connection) lo        Link encap:Local Loopback          inet addr:127.0.0.1  Mask:255.0.0.0          inet6 addr: ::1/128 Scope:Host          UP LOOPBACK RUNNING  MTU:65536  Metric:1          RX packets:190 errors:0 dropped:0 overruns:0 frame:0          TX packets:190 errors:0 dropped:0 overruns:0 carrier:0          collisions:0 txqueuelen:1          RX bytes:15885 (15.8 KB)  TX bytes:15885 (15.8 KB)wlo1      Link encap:Ethernet  HWaddr bc:85:56:47:69:37          inet addr:192.168.2.103  Bcast:192.168.2.255  Mask:255.255.255.0          inet6 addr: fe80::be85:56ff:fe47:6937/64 Scope:Link          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1          RX packets:6935 errors:0 dropped:0 overruns:0 frame:0          TX packets:600 errors:0 dropped:0 overruns:0 carrier:0          collisions:0 txqueuelen:1000          RX bytes:2412406 (2.4 MB)  TX bytes:78228 (78.2 KB)wlx74da382e3878 Link encap:Ethernet  HWaddr 74:da:38:2e:38:78          inet addr:192.168.2.1  Bcast:192.168.2.255  Mask:255.255.255.0          inet6 addr: fe80::76da:38ff:fe2e:3878/64 Scope:Link          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1          RX packets:0 errors:0 dropped:0 overruns:0 frame:0          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0          collisions:0 txqueuelen:1000          RX bytes:0 (0.0 B)  TX bytes:792 (792.0 B)iwconfig ( wlx74da382e3878 (usb-wifi-adapter) serves as Access Point)> wlo1      IEEE 802.11bgn  ESSID:TP-LINK_D>           Mode:Managed  Frequency:2.417 GHz  Access Point: A0:F3:C1:D7:33:38>           Bit Rate=1 Mb/s   Tx-Power=20 dBm>           Retry short limit:7   RTS thr:off   Fragment thr:off>           Encryption key:off>           Power Management:off>           Link Quality=70/70  Signal level=-39 dBm>           Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0>           Tx excessive retries:0  Invalid misc:11   Missed beacon:0> > wlx74da382e3878  IEEE 802.11bgn  Mode:Master  Tx-Power=20 dBm>           Retry short limit:7   RTS thr:off   Fragment thr:off>           Power Management:onhostapd.confinterface=wlx74da382e3878logger_syslog=-1logger_syslog_level=2logger_stdout=-1logger_stdout_level=2ctrl_interface=/var/run/hostapdctrl_interface_group=0ssid=TEST-WLANhw_mode=gchannel=1beacon_int=100dtim_period=2max_num_sta=255rts_threshold=2347fragm_threshold=2346macaddr_acl=0auth_algs=3ignore_broadcast_ssid=0eapol_key_index_workaround=0eap_server=0own_ip_addr=127.0.0.1rsn_pairwise=CCMPwmm_enabled=1$route -n Kernel IP routing tableDestination     Gateway         Genmask         Flags Metric Ref    Use Iface0.0.0.0         192.168.2.1     0.0.0.0         UG    0      0        0 wlo1192.168.2.0     0.0.0.0         255.255.255.0   U     0      0        0 wlo1192.168.2.0     0.0.0.0         255.255.255.0   U     0      0        0 wlx74da382e3878
No Internet Connection after plugging of second wifi interface
ubuntu;networking;wifi;network interface;dnsmasq