To create Wi-Fi HotSpot you need to configure your kernel right way. Then you need to install some software and configure it.
1.) Lets start with kernel configurations:
well i recommend to check this site and configure kernel as they say:
https://wiki.gentoo.org/wiki/Iptables
https://wiki.gentoo.org/wiki/Iptables
when your kernel is configured correctly so it support `nat` tables then it is ready. Lets continue with second step.
2.) Second step will be install of software. We will use hostapd and dnsmasq. Hostapd is to create hotspot and dnsmasq is to set ip addresses and numbers correctly... :)
Ex. config for hostapd, location /etc/hostapd/hostapd.conf:
interface=wlp3s0 # wlan0, wlp3s0 or what ever interface you use!
driver=nl80211
ssid=Your_WIFI_SSID
hw_mode=g
channel=3
ieee80211n=1
wmm_enabled=1
auth_algs=1
wpa=2
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP
wpa_passphrase=Your_WIFI_Password
Then we configure dnsmasq, location /etc/conf.d/net:
modules="wpa_supplicant"
modules_wlp3s0="!wireless"
config_wlp3s0="192.168.7.1/24"
3.) Now enable ip forwarding and masquerade nat:
#
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
#
echo 1 > /proc/sys/net/ipv4/conf/all/forwarding
# or edit /etc/sysctl.conf for startup and add line:
# net.ipv4.ip_forward=1
4.) Now lets add all the things to startup of system
rc-update add hostapd default
rc-update add dnsmasq default
5.) Restart and viola, working wifi hotspot! :) ***