Port forwarding fails


I'm having problems with port forwarding. If I add the following lines to the default version of /etc/config/firewall the port keeps closed.

config redirect
        option target 'DNAT'
        option name 'DNAT WAN to LAN for SSH'
        option src 'wan'
        option src_dport '22'
        option dest 'lan'
        option dest_ip ''
        option dest_port '22'

I turned off the firewall at

What am I doing wrong?


opkg update
opkg install tcpdump
tcpdump -i any tcp port 22

Then check the port 22/tcp from the outside while monitoring the tcpdump output.
If there's no connection attempts, then we can do nothing.

1 Like

thanks for your quick answer.

I'm seeing connections attemps in the log. Those are good news :slight_smile:

1 Like

Check on the destination host:

  • Default gateway is OpenWrt.
  • Firewall configuration does not limit access to SSH.
  • SSH server is listening on the specified port.

If the issue persists, run tcpdump on the destination host.

1 Like

Solved! It was a problem on the ssh server side. Thank you so much @vgaetera


This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.