OpenWrt autoload script

Hello openwrt!:slight_smile:
There is: Netgear dg834g, the connection is carried out remotely through 8080.

The router goes to the Internet via pppoe with a pair of login / pass. Task: Install openwrt on it followed by a script to establish the above login / pass pair to resume access to the Internet and then raise the remote control to port 8080 (http) or ssh. I looked in the direction of imagebuilder https://openwrt.org/docs/guide-user/additional-software/imagebuilder. I found the following through remote access: https://aiotutorials.wordpress.com/2016/06/28/openwrt-remote- access /

But is this the right way? Thanks

I think what you want is configurable, there's no need for any extra script. It is not recommended to open the Luci interface or ssh server to the outside because of possible security issues, though.

Maybe I should change something in the packages?
For example, change /etc/interfaces/network

config 'interface' 'wan'
        option 'ifname' 'eth1'
        option 'proto' 'dhcp'

config 'interface' 'wan2'
	option 'ifname' 'eth1'
	option 'peerdns' '1'
	option 'defaultroute' '1'
	option 'proto' 'pppoe'
	option 'username' 'mylogin'
	option 'password' 'mypass'

The Image Builder can be used to make a custom image with your own config files already in the root filesystem. After flashing this image it will immediately start working with your configuration.

You would need to pre-make an /etc/config/network file for your WAN connection, and an /etc/config/firewall replacing the default to open ports to outside. It is OK to expose Dropbear to the Internet if you use public key authentication, which requires placing a key in /etc/dropbear/authorized_keys and configuring dropbear in /etc/config/dropbear. Never open LuCI to the Internet.

well, config was premade, but I couldn't attach him as imagebuilder package. I tried to open another compatible firmware with firmware mod kit, but got failure. What it can be?

You have to build your own firmware and include it in the files directory as described here: https://openwrt.org/docs/guide-developer/build-system/use-buildsystem#custom_files

I assume you are building the image like this: https://openwrt.org/docs/guide-user/additional-software/beginners-build-guide#compiling_openwrt