I'm new to OpenWRT and I'm trying to access a Proxmox server behind an OpenWRT router using port forwarding. However, I haven't been able to get it working.
Here is my setup:
The Proxmox web UI is served at the address 10.0.0.1:8006.
The OpenWRT router’s WAN interface (192.168.1.21) is connected to my ISP router.
Both the OpenWRT router and the laptop from which I am trying to access the Proxmox web UI are connected to my ISP LAN (192.168.1.0/24).
Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button (red circle; this works best in the 'Markdown' composer view in the blue oval):
Remember to redact passwords, VPN keys, MAC addresses and any public IP addresses you may have:
ubus call system board
cat /etc/config/network
cat /etc/config/dhcp
cat /etc/config/firewall
Check this - enter rules manually in conf file, 1000 ways to mis-click in luci OpenWrt & Nextiva Voip - #13 by brada4
You need only one redirect/dnat rule not to "this device" but clear the field so as to "any device"
I did'nt manage to find how to get rid of the "this device" from the Lucy UI. This is the config that is currently running for port forwarding on my router :
Masquerade is not set on the wan zone. (The default is for it to be set). Since you haven't mentioned anything about symmetric routing you need it to be set, as port forwarding (redirect) is only meaningful in the context of NAT (masquerade.)
Also, remove the option gateway setting from the lan Interface.
config redirect
option target 'DNAT'
option src 'wan'
option src_dport '8006'
option dest_ip '10.0.0.1' # hope this is not routers own LAN IP
option family 'ipv4'
option proto 'tcp'
option enabled '0'
I think 'target DNAT' is required for forward { status dnat accept rule
This is the WAN interface of the openwrt router that is on the LAN of my ISP router, there is no access to it from internet.
I'll try tomorrow with config you sent :
config redirect
option target 'DNAT'
option src 'wan'
option src_dport '8006'
option dest_ip '10.0.0.1' # hope this is not routers own LAN IP
option family 'ipv4'
option proto 'tcp'
option enabled '0'
Thank you for your answers, and sorry if I didn't explained well enough what I want to do.
I just want to access services behind the openwrt router from the my home router LAN, not over internet.
My home router ip is 192.168.1.1 (network:192.168.1.0/24)
The openwrt router is connected to the home router through it's WAN interface (ip:192.168.1.21)
The proxmox server (ip:10.0.0.1) is connected to a LAN of the openwrt router (network 10.0.0.0/24)
With what I have set up : is it possible to access proxmox server webui, from another computer connected to my home router's LAN ? (192.168.1.0/24)