Greetings. I have a main router, in one of the LAN ports of which a laptop with OpenWRT is connected, it acts as a Samba server and Wi-Fi access point. This is the only port in the laptop defined by the system as eth0
, and if in the interfaces to create a new interface for eth0
, and in the protocol to select the DHCP-client and create a bridge, in the settings of access point interface to select this created br-wan
, then everything works fine, but I do not want to create a bridge between Wi-Fi and gateway, I need the laptop to be as a NAT-router too. How do I properly configure the interfaces and firewall for this?
Gateway IP: 192.168.1.1
Laptop IP in the router's network: 192.168.1.130
I am also attaching my configs below:
network
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fd91:d418:f904::/48'
config interface 'wan'
option proto 'dhcp'
option ifname 'eth0'
option type 'bridge'
firewall
config defaults
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
option synflood_protect '1'
config include
option path '/etc/firewall.user'
wireless
config wifi-device 'radio0'
option type 'mac80211'
option hwmode '11g'
option path 'pci0000:00/0000:00:1c.1/0000:02:00.0'
option txpower '18'
option channel 'auto'
option country 'UA'
option htmode 'HT20'
config wifi-iface 'wifinet0'
option device 'radio0'
option mode 'ap'
option ssid 'ssid'
option encryption 'psk2+ccmp'
option key 'password'
option network 'wan'