You are not logged in.

#1 2014-12-12 06:50:28

berlin
Member
Registered: 2012-07-30
Posts: 14

[Solved] Sharing ethernet via wi-fi with NetworkManager and dnsmasq

I want to share my ethernet connection to my android phone. So I installed dnsmasq for working as dhcp server.
Here are my configs:
/etc/resolv.conf

search telecom.by
nameserver 127.0.0.1
nameserver 8.8.8.8
nameserver 213.184.225.37
nameserver 213.184.224.254

/etc/dnsmasq.conf

user=dnsmasq
group=dnsmasq
port=53
cache-size=1000
domain-needed
bogus-priv
interface=wlp8s0
dhcp-range=192.168.1.2,192.168.1.150,12h
dhcp-host=MAC-ADDRESS,192.168.1.2
#dhcp-authoritative

The I've created new Wireless (Share) connection in network manager:
nm

Now I can connect via my phone to the wi-fi network and access local servers, use airdroid and unified remote programms. But when I want access external web-resource such as google.com or archlinux.org the loading bar in the browser hangs and nothing is loaded.
So I have two questions:

  • How to setup network manager in Automatic method in ip-v4 tab

  • What should I do to access external websites from my phone via this wi-fi network

Last edited by berlin (2014-12-15 19:10:29)

Offline

#2 2014-12-12 17:42:29

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,353

Re: [Solved] Sharing ethernet via wi-fi with NetworkManager and dnsmasq

Can you hit web sites by address? for example, 66.211.214.131  (archlinux.org)?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2014-12-12 19:47:34

berlin
Member
Registered: 2012-07-30
Posts: 14

Re: [Solved] Sharing ethernet via wi-fi with NetworkManager and dnsmasq

ewaller wrote:

Can you hit web sites by address? for example, 66.211.214.131  (archlinux.org)?

no

Offline

#4 2014-12-15 19:10:02

berlin
Member
Registered: 2012-07-30
Posts: 14

Re: [Solved] Sharing ethernet via wi-fi with NetworkManager and dnsmasq

So I was wrong. To share internet connection you need use hostapd. With create_ap all works pretty well https://bbs.archlinux.org/viewtopic.php?id=162895

Offline

#5 2014-12-16 15:47:31

Erhan
Member
Registered: 2012-12-05
Posts: 12

Re: [Solved] Sharing ethernet via wi-fi with NetworkManager and dnsmasq

If someone finds this by google, try:

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

where eth0 is the outgong connection.

Offline

Board footer

Powered by FluxBB