I'm trying to set up a NordVPN hotspot on my Raspberry Pi 3B+ so I can connect it to my smart tv and get rid of Netflix region restrictions.
I have everything set up properly but still dnsmasq DHCP is refusing to give any IP address to devices that try to connect through Wifi.
I have set up static ip address on wlan0 in /etc/dhcpd.conf:
interface wlan0
static ip_address=192.168.1.1/24
here is how my /etc/dnsmasq.conf looks like:
interface=wlan0
dhcp-range=192.168.1.2,192.168.1.10,24h
dhcp-option=3,192.168.1.1 #Gateway
my /etc/hostapd/hostapd.conf looks like this:
interface=wlan0
ssid=SSID
hw_mode=g
channel=7
wmm_enabled=0
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=Password
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
and i have done my iptables accordingly:
iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE
iptables -A FORWARD -i tun0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i wlan0 -o tun0 -j ACCEPT
and here is the output of iptables --list
:
Chain INPUT (policy DROP)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT all -- anywhere anywhere
Chain OUTPUT (policy DROP)
target prot opt source destination
Now I connect to NordVPN using:
nordvpn connect UK
and after connection is established and I can see tun0 connected in ifconfig
and confirm that the VPN is active with traceroute
, I take my phone and attempt to connect to the WiFi hotspot that was just created but it is stuck on "Obtaining IP Address" and never succeeds. I have tried a Windows Laptop and my smart TV as well and both fail to obtain IP address.
Does anyone know what the issue here is? Any help would be really appreciated.
sudo netstat -laputen |grep :67
what is the pid name of your dhcp server ? – Ephemeral Sep 05 '19 at 18:17sudo openvpn /pathtoconfig/
to connect to a openvpn server using a config file this issue with dhcp doesn't exist. I can have a openvpn hotspot without a problem. But Netflix can detect openvpn and doesn't let me watch.so I need to be able to use thenordvpn
linux app but when that is active as tun0, for some reason the hotspot refuses to issue IP addresses. – Alen Sep 05 '19 at 18:23sudo dmesg
orsudo cat /var/log/syslog
? – Ephemeral Sep 05 '19 at 18:25nohook wpa_supplicant
? – Ephemeral Sep 05 '19 at 18:27nohook wpa_supplicant
too. I am currently re configuring the whole thing from scratch to run the commands you told mesudo dmesg
andsudo cat /var/log/syslog
. – Alen Sep 05 '19 at 18:37dhcpcd
and notdhcpd
, isn't it? If you start from scratch you may consider to use built-in functionality without fiddling with dnsmasq, hostapd and dhcpcd. This could simplify things: Setting up a Raspberry Pi as an access point - the easy way. – Ingo Sep 05 '19 at 20:50