OpenWrt Forum Archive

Topic: I've set up port forwarding and it is not working (for real) :)

The content of this topic has been archived on 31 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I have used the external IP and not the internal, for extra good measure I used a proxy hosted off lan to test it.  No luck..

I am using X-WRT currently because I heard that people had more luck with it in some cases.. I also like it's admin UI..

anyhow.. heres my info from Network --> Firewall :

Protocol: TCP
Destination Ports: 1337
Target: 192.168.1.102
(Target) Port: 80

I have also tried setting target port to 1337, with my apache server listening on both 1337 and 80... I have tried leaving the target port blank.. no luck, I would also like it to be known that I tried this the old fashioned way through iptables, editing /etc/firewall.user over vi in ssh.  I have tried with each change both resetting the firewall, and reseting the router itself..  No matter what I do it doesnt seem to work..  I am not new to Linux personally, but new to use of OpenWRT.  Any feedback is welcome, willing to try anything to make this work.

Using White Russian 0.9


HERES SOME INFO FOR GOOD MEASURE

My /etc/config/firewall file:
forward:proto=tcp dport=1337:192.168.1.102:80

Installed Packages:
Uninstall    base-files    9    OpenWrt filesystem structure and scripts
Uninstall    base-files-brcm    2    Board/architecture specific files
Uninstall    bridge    1.0.6-1    Ethernet bridging tools
Uninstall    busybox    1.00-5    Core utilities for embedded Linux systems
Uninstall    chat    2.4.3-7    Utility for establishing a connection with the ISP's PPP server (e.g. via Modem)
Uninstall    dnsmasq    2.35-1    A lightweight DNS and DHCP server
Uninstall    dropbear    0.48.1-1    a small SSH 2 server/client designed for small memory environments.
Uninstall    ez-ipupdate    3.0.11b8-2    a client for dynamic DNS services
Uninstall    haserl    0.8.0-1    a CGI wrapper to embed shell scripts in HTML documents
Uninstall    ip    2.6.11-050330-1    iproute2 routing control utility
Uninstall    ipkg    0.99.149-2    lightweight package management system
Uninstall    iptables    1.3.3-2    The netfilter firewalling software for IPv4
Uninstall    iptables-extra    1.3.3-3    Other extra Iptables extensions (meta-package)
Uninstall    iptables-mod-conntrack    1.3.3-3    Iptables (IPv4) extensions for connection tracking
Uninstall    iptables-mod-extra    1.3.3-2    Other extra Iptables (IPv4) extensions
Uninstall    iptables-mod-filter    1.3.3-3    Iptables (IPv4) extension for packet content inspection
Uninstall    iptables-mod-imq    1.3.3-3    Iptables (IPv4) extensions for Intermediate Queuing Device QoS-support
Uninstall    iptables-mod-ipopt    1.3.3-3    Iptables (IPv4) extensions for matching/changing IP packet options
Uninstall    iptables-mod-ipsec    1.3.3-3    Iptables (IPv4) extensions for matching special IPsec packets
Uninstall    iptables-mod-nat    1.3.3-2    Iptables (IPv4) extensions for different NAT targets
Uninstall    iptables-mod-ulog    1.3.3-3    Iptables (IPv4) extension for user-space packet logging
Uninstall    iptables-utils    1.3.3-2    iptables-save and iptables-restore for Iptables (IPv4)
Uninstall    iwlib    28.pre7-1    Library for setting up WiFi cards using the Wireless Extension
Uninstall    kernel    2.4.30-brcm-5   
Uninstall    kismet    2006-04-R1-1    kismet
Uninstall    kismet-client    2006-04-R1-1    The kismet client
Uninstall    kismet-server    2006-04-R1-1    The kismet server
Uninstall    kmod-brcm-wl    2.4.30-brcm-5    Proprietary driver for Broadcom Wireless chipsets
Uninstall    kmod-crypto    2.4.30-brcm-5    CryptoAPI kernel modules
Uninstall    kmod-diag    2.4.30-brcm-5    Kernel modules for LEDs and buttons
Uninstall    kmod-gre    2.4.30-brcm-5    Kernel GRE tunneling support
Uninstall    kmod-imq    2.4.30-brcm-5    Kernel support for the Intermediate Queueing device
Uninstall    kmod-ipt-conntrack    2.4.30-brcm-5    Extra Netfilter (IPv4) kernel modules for connection tracking
Uninstall    kmod-ipt-extra    2.4.30-brcm-5    Other extra Netfilter (IPv4) kernel modules
Uninstall    kmod-ipt-filter    2.4.30-brcm-5    Netfilter (IPv4) kernel modules for packet content inspection
Uninstall    kmod-ipt-ipopt    2.4.30-brcm-5    Netfilter (IPv4) kernel modules for matching/changing IP packet options
Uninstall    kmod-ipt-ipsec    2.4.30-brcm-5    Netfilter (IPv4) kernel modules for matching special IPsec packets
Uninstall    kmod-ipt-nat    2.4.30-brcm-5    Netfilter (IPv4) kernel modules for different NAT targets
Uninstall    kmod-ipt-nat-default    2.4.30-brcm-5    Default Netfilter (IPv4) NAT kernel modules for special protocols
Uninstall    kmod-ipt-nat-extra    2.4.30-brcm-5    Extra Netfilter (IPv4) NAT kernel modules for special protocols
Uninstall    kmod-ipt-queue    2.4.30-brcm-5    Netfilter (IPv4) kernel module for user-space packet queuing
Uninstall    kmod-ipt-ulog    2.4.30-brcm-5    Netfilter (IPv4) kernel module for user-space packet logging
Uninstall    kmod-iptables-extra    2.4.30-brcm-5    Extra kernel modules for iptables
Uninstall    kmod-mppe    2.4.30-brcm-5    Microsoft PPP Encryption/Compression support
Uninstall    kmod-ppp    2.4.30-brcm-5    PPP support
Uninstall    kmod-pppoe    2.4.30-brcm-5    PPP over Ethernet support
Uninstall    kmod-sched    2.4.30-brcm-5    Kernel schedulers for IP traffic
Uninstall    kmod-switch    2.4.30-brcm-1    switch driver for robo/admtek switch
Uninstall    kmod-tun    2.4.30-brcm-5    Kernel TUN/TAP extension
Uninstall    kmod-wlcompat    2.4.30-brcm-4    Compatibility module for using the Wireless Extension with broadcom's wl
Uninstall    libelf    0.8.8-1    ELF object file access library
Uninstall    libgcc    3.4.4-9    GCC support library
Uninstall    liblzo    2.02-1    a real-time data compression library
Uninstall    libncurses    5.2-7    a terminal handling library and common terminal definitions
Uninstall    libnetsnmp    5.1.2-2.1    Open source SNMP implementation (librairies)
Uninstall    libopenssl    0.9.8d-1    OpenSSL (Secure Socket Layer) libraries
Uninstall    libpcap    0.9.4-1    a low-level packet capture library
Uninstall    libpcre    5.0-3    a Perl Compatible Regular Expression library
Uninstall    mtd    5    Tool for modifying the flash chip
Uninstall    nmap    3.81-2    Nmap is a free open source utility for network exploration or security auditing.
Uninstall    nvram    1    NVRAM utility and libraries for Broadcom hardware
Uninstall    openssh-server    4.4p1-1    OpenSSH server
Uninstall    openvpn    2.0.8-1    Open Source VPN solution using SSL
Uninstall    ppp    2.4.3-7    a PPP (Point-to-Point Protocol) daemon (with MPPE/MPPC support)
Uninstall    ppp-mod-pppoe    2.4.3-7    a PPPoE (PPP over Ethernet) plugin for PPP
Uninstall    pptp    1.6.0-3    a Point-to-Point Tunneling Protocol (PPTP) client
Uninstall    pptpd    1.3.0-2    a Point-to-Point Tunneling Protocol (PPTP) server
Uninstall    qos-scripts    0.9.4-1    QoS scripts for OpenWrt
Uninstall    snmpd    5.1.2-2.1    Open source SNMP implementation (daemon)
Uninstall    tc    2.6.11-050330-1    iproute2 traffic control utility
Uninstall    tinyproxy    1.6.3-1    Tinyproxy is a lightweight HTTP and HTTPS proxy.
Uninstall    uclibc    0.9.27-9    Standard C library for embedded Linux systems
Uninstall    uclibc++    0.1.11-2    A standard c++ library for embedded systems
Uninstall    webif    0.2-1    A modular, extensible web interface for OpenWrt.
Uninstall    wificonf    6    Replacement utility for wlconf
Uninstall    wireless-tools    28.pre7-1    Tools for setting up WiFi cards using the Wireless Extension
Uninstall    xinetd    2.3.13-2    a powerful and secure superserver
Uninstall    zlib    1.2.2-2    an implementation of the deflate compression method (library)

(sorry for pasting as was from admin panel, got lazy big_smile )

Hope for anyone to solve my problem. B-)

bump, will bump only one more time after this if no reply.

try to make the destinationport the same as the port you're running on the inside machine..
Also most of the time for proxy's it's only allowed to allow port 80 and 443 (SSL) pass trough
the others are mostly blocked.. check that out?

Good luck

I suggest doing this:

Protocol: tcp
Destination Ports: 80
Target: 192.168.1.102
(Target) Port: 80

Make sure to save and apply changes.  To see if your changes where implemented look in the menu Status/Iptables.  Look for the section forwarding_wan.  You should see something like:

Chain forwarding_wan (1 references)
num pkts bytes target prot opt in out source     destination    options
 -   -    -    ACCEPT  tcp  --  *  *  0.0.0.0/0  192.168.1.102  tcp dpt:80

The discussion might have continued from here.