I'm trying and I can't connect my HLK-7688a on the internet.
I would like to put all HLK ports as a LAN port and disable the firewall.
Objetio: I am developing a firewall firmware for an application I already have, the project is to receive data from ethrnet ports 0 to 3 and by UDP and forward to via lan4 to another separate network. It is the first time that I use openwrt but I have been developing firmware for raspberry cards for a while now.
What should I do to be able to network on ports 0-3 and receive internet and network on port 4
BusyBox v1.22.1 (2016-09-21 09:49:24 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
BARRIER BREAKER (Barrier Breaker, unknown)
-----------------------------------------------------
* 1/2 oz Galliano Pour all ingredients into
* 4 oz cold Coffee an irish coffee mug filled
* 1 1/2 oz Dark Rum with crushed ice. Stir.
* 2 tsp. Creme de Cacao
-----------------------------------------------------
I didn't change the network file, it follows the pattern that comes with the installation
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
OpenWrt 19.07-SNAPSHOT, r10918-2a84434
-----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
There are many things wrong with your unsuccessful network configuration. It looks like you should be able to import the Barrier Breaker one instead of attempting to re-write the whole thing.
You need switch configuration in /etc/config/network to set up for VLANs.
A port.vlan can be in only one network interface. When running VLANs on a port do not attach the parent port (eth0) to anything.
When WAN is DHCP, it will take care of setting default gateway. 'gateway 255.255.0.0' makes absolutely no sense. It needs to be the IP of the router that is next in line to the Internet.
option type should be 'bridge' not 'client'.
Overall are you looking to run this as a LAN->WAN router or as a LAN device?
I wanted to create two different networks, one for port 4 (network 1) of the module and another for ports 1 to 3 (network 2).
I'm making a firmware that create a UDP server on network 1 will decode the data, check if it is valid, check which equipment the data is linked to, code again and send it to the equipment using a UDP port on network 2, there are two different networks .
It's not complicated to set up another VLAN and do that (though I would keep the default LAN as network 1 and the new custom application as network 2).
But first you have to have a handle on the basic LAN->WAN operation then add to that.
I did some research but I still haven't been successful, I have the two networks with different ips but I can't ping them.
I collected some more information to see if it helps in my case:
ls -l /sys/class/net
lrwxrwxrwx 1 root root 0 Feb 5 04:23 br-lan -> ../../devices/virtual/net/br-lan
lrwxrwxrwx 1 root root 0 Feb 5 04:00 br-lan2 -> ../../devices/virtual/net/br-lan2
lrwxrwxrwx 1 root root 0 Jan 1 1970 eth0 -> ../../devices/platform/10100000.ethernet/net/eth0
lrwxrwxrwx 1 root root 0 Feb 5 04:00 eth0.2 -> ../../devices/virtual/net/eth0.2
lrwxrwxrwx 1 root root 0 Jan 1 1970 lo -> ../../devices/virtual/net/lo
lrwxrwxrwx 1 root root 0 Feb 5 04:22 wlan0 -> ../../devices/platform/10300000.wmac/net/wlan0
There are still a lot of fundamental problems here.
First you really need to get the fundamentals before trying your final setup. Have one network, the LAN, and be able to access the Internet with it.
Porting to a new device is an advanced topic. I would suggest practicing on a fully supported device that has a release build with known working default configurations. Look at the wiki about the " dumb AP" use case for where you should begin.
No offense but your attempt to write /etc/config/network from scratch shows you don't know some basic concepts. Your use of IP addresses and netmasks has not produced two independent networks. You keep using plain eth0 when you should not. The swconfig show shows the CPU is actually port 6, and there is only one live Ethernet cable, plugged into port 3. But again your syntax trying to configure the switch is completely nonsense so it doesn't matter.
I think I'm expressing myself wrong, I don't want my equipment to be a router, there will already be a router on the network, I just want it to connect to the network through the ports so it will be a firewall that will be watching what is going on in the network 1 and pass relevant data to network 2.
I think my settings are not working because he is putting a dhcp on the lan network, what should I do so he only connects to a network?
Do you just want to bridge certain packets from one interface to another? If so, you just set up a single interface, as a bridge, and enable bridge netfilters so that iptables runs on the bridge and filters the traffic down to the stuff you want to let through.