1

I want to be able to forward port 5678.

Here's my equipment and details:

  • Modem: ARRIS SURFboard SB6121 DOCSIS 3.0 Cable Modem
  • Router: Cisco Linksys E2000
  • DD-WRT v24-sp2
  • OS: Windows 10
  • ISP: Cox Communications

Here's what I've tried:

  1. Navigate to 192.168.1.1 (Default gateway) to access dd-wrt page. Go to NAT/QoS -> Port Forwarding tab. Enter in port with 192.168.1.1 as IP address.
  2. Same as above but with 192.168.1.120 (IPv4 Address) as my IP address.
  3. Same as above but with my WAN IP
  4. Tried adding the following commmand under Adminstration -> Commands and hit Save Firewall

    insmod ipt_mark
    insmod xt_mark
    iptables -t mangle -A PREROUTING -i ! get_wanface -d nvram get wan_ipaddr -j MARK --set-mark 0xd001
    iptables -t nat -A POSTROUTING -m mark --mark 0xd001 -j MASQUERADE

After each one of these I go to Administration -> Management and click the Reboot Router button on the bottom. Then I go to yougetsignal to check if it's open.

Nothing has worked at all. I called Cox and they said they don't help with port forwarding. My Windows firewall is completely turned off as well. I have no idea what it could be. Any ideas?

  • AFAIK you do not need your rule (3). If anything, you should fiddle with your modem on WAN side; router is ok with the 192.168.1.1 --> 192.168.1.120 rule. – SΛLVΘ Nov 14 '15 at 22:53
0

Here are the rules that I use to forward.

# Preroute the wan packet to your local network
iptables -t nat -A PREROUTING -i vlan1 -p tcp --dport <wan_port> -j DNAT --to-destination <lan_ip>:<lan_Port>

# Accept the packet through the forward filter
iptables -t filter -A FORWARD -i vlan1 -d <lan_ip> -p tcp --dport <lan_port> -j ACCEPT
# If you are using a UDP port, change the above tcp -> udp
  • so what ip address should I use? My default gateway, ipv4 or wan ip? And if I'm port forwarding with both protocols (TCP and UDP) then how would the command above change? – John Bernal Nov 15 '15 at 0:49
  • The ip address is going to be the device being forwarded to. And if you are doing both udp and tcp, copy the same commands, and replace tcp -> udp, these use the -i flag and insert into the chains, they will not be over written by sequential commands. – Matt Clark Nov 15 '15 at 2:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.