Jump to content
Not connected, Your IP: 3.139.236.93
Sign in to follow this  
tommy83

DD-WRT Router and Port Forwarding

Recommended Posts

Hello to everyone. I own a Linksys WRT54G Router with DD-WRT openvpn firmware #16454.

No problem in connecting to Airvpn servers, all working very well.

But I discovered that I just can't forward any port to any PC behind my router.

In my opinion, if all the traffic pass through the vpn port (i.e. 80) then the virtual server configuration of the router is uneffective because I must route a port that is INSIDE the vpn.

So I must use IPTABLES for that? And where to put this command?

Can Admin or someone else tell me a clear example of this procedure...?

Thanks in advance!!

Share this post


Link to post
Guest ergolon

Actually I *am* interested... got the same problem!

It´d be great if you could help me out on this one...

Share this post


Link to post

Hello!

You can achieve your purpose with DNATting.

Make sure that you have remotely forwarded the ports you wish.

Then please add the following iptables rules for each TCP/UDP port you wish to forward:

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

iptables -t nat -I PREROUTING -i -p udp --dport -j DNAT --to-destination

where:

- is the port number of the port you want to forward to a device

- is the IP address (for example 192.168.x.y) of the device you wish to forward packets on that port to

- is the TUN/TAP adapter name (for example tun1)

Kind regards

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Security Check
    Play CAPTCHA Audio
    Refresh Image
Sign in to follow this  

×
×
  • Create New...