Raspberry pi 4 no internet

I got new pi 4 and want to use it as a router. I was able to flash image and but it has no internet connectivity when connected to router and I cant install LUCI or update package list.
My old router is also using openwrt and its IP is 192.168.1.1
I was able to change IP on pi 4 and it is 192.168.1.2 but still no internet connectivity. Can someone please help me? using Linux and editing files is new think for me so Please explain steps in details.
Thank you,

uci set network.lan.gateway='192.168.1.1'
uci set network.lan.dns='192.168.1.1'
uci commit; /etc/init.d/network restart; sleep 15; opkg update
opkg install luci

next time you might be better off using this [ type "rasp" > select board ].. [request build] then zap the factory to sdcard.

2 Likes

I flashed image in sd card from windows.
thank you so much it worked.
I want to use pi 4 as router.
In my old router wan interface is pppoe.
Should i copy paste config files from old router in Pi 4?
I want to use usb to ethernet adapter as wan in pi 4 and how to install driver for it is usb to gigabit ethernet adapter from tplink and gigbit as lan with switch.
Can please give me step by step guide
Thank you,

opkg install kmod-usb-net-rtl8152
uci set network.wan=interface
uci set network.wan.ifname='eth1'
uci set network.wan.proto='dhcp'
uci commit; /etc/init.d/network restart

you will need to login to LUCI to configure pppoe etc...

1 Like

can i copy paste settings from my old router into PI 4?
here are settings i got for my IPTV

Try edit /etc/config/firewall like this:

config zone
        .......................
        option name 'wan'
        option network 'wan IPTV'

and /etc/config/igmpproxy

config igmpproxy
        option quickleave 1

config phyint
        option network IPTV
        option zone wan
        option direction upstream
        list altnet 0.0.0.0/0

config phyint
        option network lan
        option zone lan
        option direction downstream

/etc/config/network

config interface 'IPTV'                                                                                                                                                                                                                             
        option ifname 'eth0.2'                                                                                                                                                                                                                       
        option proto 'static'                                                                                                                                                                                                                        
        option netmask '255.255.255.0'                                                                                                                                                                                                               
        option ipaddr '10.10.10.1'

generally... on a line by line basis... it's ok... make copies first in case things aren't favourable...

this might need to be eth1 ... if it was set to your wan interface in your old config...

Ok please tell me i can copy paste here complete config files.
where i need to look for it?

Look at /etc/config/network. You need to change the "ethxx" interface to suit raspi4 based on the above configuration.