My laptop (use's Ubuntu 13.10) is connected to internet using a wired connection at eth0
with ip 192.168.42.13
and it also acts as a wifi hotspot
at wlan0
with the ip 192.168.1.1
(i used airbase-ng to set up the ap). Now I have an android device that needs to get connected to that wifi. I see that my android is able to connect to the hotspot
and receive the following network settings from the dhcp
server I set up. (I used a tool call Net Info II from PlayStore to see the below details on my android).
# My android network settings (connected to the wlan0 of my laptop):
ip address: 192.168.1.10
subnetmask: 255.255.255.0
gateway : 192.168.1.254
ap-mac : xx:xx:xx:xx:xx:xx
# My pc's eth0 configuration
ip address: 192.168.42.13
submetmask: 255.255.255.0
gateway : 192.168.42.129
iface mac : yy:yy:yy:yy:yy:yy
# My pc's wlan0 (hotspot interface) configuration
ip address: 192.168.1.1
subnetmask: 255.255.255.0
gateway : 192.168.1.1
iface mac : zz:zz:zz:zz:zz:zz
This thread here talks about a similar problem. I see that I need to forward packets between eth0
and wlan0
network to connect my wireless ap's devices to internet. Now How do I forward the packets I receive from wlan0 to eth0
and eth0 to wlan0
to get my device connected to internet ?
dhcpd.conf
properly. I should set it to192.168.1.1
I guess. Thanks for the correction !!!