OpenWrt Forum Archive

Topic: Automatically create resolv.conf? No internet, only LAN on wifi Bridge

The content of this topic has been archived on 1 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I want to apologize for the lame title as I couldn't think of anything that would better describe my problem.

This is my setup:

Router ==> (wireless signal) Bridge ==> (wired) to computer

The bridge can ping anyone on the network, but can't access outside of LAN (internet) so ping google.com doesn't work
The computer however can access the LAN and the Internet.

If I do vi /etc/resolv.conf and add nameserver 192.168.1.1 I can ping google.com on the bridge and all other internet sites

So how can I have resolv.conf create automatically with nameserver 192.168.1.1 ? I do not have the firewall or dnsmasq services running

/etc/conf/network

#### VLAN configuration 
config switch eth0
        option vlan0    "1 2 3 4 5*"
        option vlan1    "0 5"


#### Loopback configuration
config interface loopback
        option ifname   "lo"
        option proto    static
        option ipaddr   127.0.0.1
        option netmask  255.0.0.0


#### LAN configuration
config interface lan
        option type     bridge
        option ifname   "eth0.0"
        option proto    static
        option ipaddr   192.168.1.90
        option netmask  255.255.255.0
        option gateway  192.168.1.1


#### WAN configuration
config interface        wan
        option ifname   "eth0.1"
        option proto    'none'

/etc/conf/wireless

config wifi-device  wl0
        option type     broadcom
        option channel  6

        # REMOVE THIS LINE TO ENABLE WIFI:
        option disabled 0

config wifi-iface
        option device   wl0
        #option network lan
        option mode     sta
        option ssid     OpenWrt
        option hidden   0
        option encryption none
        option network  'lan'
        option bgscan   '0'

Perhaps you need dnsmasq to automatically create it, but I'm not sure about it.
On my AP that file is automatically created, maybe because of dnsmasq

Sweet! That did the trick thanks so much!

The discussion might have continued from here.