Mac iTOps Tube

Wednesday, May 16, 2012

Port forwarding on vpn router client

I am new to advanced networking so please forgive me.

I have set up my router as a VPN client using dd-wrt. Everything works great and I can selectively tunnel specific computers on the network through VPN. I have a computer acting as a web server using the VPN tunnel, but I am unable to hit it thought the VPN connection or WAN connection as the port does not appear to be open.

I have tried manually forwarding the port with the following:


iptables -t nat -I PREROUTING -i tun1 -p tcp --dport 80 -j DNAT --to-destination

which results in the following iptable rules:


root@RT-N16-MAIN:~# iptables -t nat -L -n -v

Chain PREROUTING (policy ACCEPT 517 packets, 53289 bytes)

 pkts bytes target    prot opt in    out    source              destination       

    0    0 DNAT      tcp  --  tun1  *            tcp dpt:80 to:

    0    0 DNAT      icmp --  *      *        to:

  170 20304 TRIGGER    0    --  *      *        TRIGGER type:dnat match:0 relate:0

Chain POSTROUTING (policy ACCEPT 27 packets, 1567 bytes)

 pkts bytes target    prot opt in    out    source              destination       

  158 10242 MASQUERADE  0    --  *      tun1           

  175 20257 SNAT      0    --  *      vlan2

    0    0 RETURN    0    --  *      br0            PKTTYPE = broadcast

    2  586 MASQUERADE  0    --  *      br0     

Chain OUTPUT (policy ACCEPT 155 packets, 10331 bytes)

 pkts bytes target    prot opt in    out    source              destination

I was hoping that someone can point me in the right direction to get this working. Sorry if I didn't provide enough info, but let me know if further info is needed. Any help/suggestions/direction is much appreciated!


No comments:

Post a Comment