Jump to content
Not connected, Your IP: 18.116.20.52
tamitos

Can't connect to device behind router

Recommended Posts

Currently, I use AirVpn on my dd wrt R7000. All of my devices are connecting to this router : PC, NAS , Mobiles. The problem comes when I use PC and try to connect to my NAS via XXXX.synology.me:XXXX. It does not response anything. If I use 192.168.1.6, I can connect to my NAS.

 

However, when I use eddie client with different server than the one on my dd wrt, I can connect to my NAS thru XXX.synology.me:XXXX. What is the problem?

 

Below is what I config in firewall (get from AirVPN forum)

 

iptables -I FORWARD -i br0 -o tun1 -j ACCEPT
iptables -I FORWARD -i tun1 -o br0 -j ACCEPT
iptables -I INPUT -i tun1 -j REJECT
iptables -t nat -A POSTROUTING -o tun1 -j MASQUERADE

iptables -I FORWARD -i tun1 -p tcp -d 192.168.1.2 --dport 5000 -j ACCEPT
iptables -t nat -I PREROUTING -i tun1 -p tcp --dport 5000 -j DNAT --to-destination 192.168.1.2

 

ps. I already forward port in client area (airvpn). I did not forward any port on dd wrt GUI.

Share this post


Link to post

you'll have to forward ports on your router (not from WAN to LAN, but from TUN to LAN) so you probably can't use the web GUI.  Search this forum for port forwarding IP tables for dd-wrt and tomato.  There's an official thread that Air staff made for this.

Share this post


Link to post

@ go558a83nk

 

These two lines below. I found from this forum where I need to change local ip address and port. If I recall Air Staff posted how to do it, if I am correct.

 

iptables -I FORWARD -i tun1 -p tcp -d 192.168.1.2 --dport 5000 -j ACCEPT
iptables -t nat -I PREROUTING -i tun1 -p tcp --dport 5000 -j DNAT --to-destination 192.168.1.2

 

Do I need addition rule to forward TUN to LAN?

 

Thank you

Share this post


Link to post

root@XXX:~# ip route
default via 169.234.228.129 dev vlan2
10.30.0.0/16 dev tun1  proto kernel  scope link  src 10.30.0.178
127.0.0.0/8 dev lo  scope link
XXX.XXX.XXX.XXX/25 dev vlan2  proto kernel  scope link  src XXX.XXX.XXX.XXX
XXX.XXX.XXX.XXX/16 dev br0  proto kernel  scope link  src XXX.XXX.XXX.XXX
192.168.1.0/24 dev br0  proto kernel  scope link  src 192.168.1.1

 

VPN uses tun1 so I believe I set it correctly. My NAS is at 192.168.1.6 which need port 5000 to connect to.

 

Any suggestion?

 

Share this post


Link to post

root@XXX:~# ip route

default via 169.234.228.129 dev vlan2

10.30.0.0/16 dev tun1  proto kernel  scope link  src 10.30.0.178

127.0.0.0/8 dev lo  scope link

XXX.XXX.XXX.XXX/25 dev vlan2  proto kernel  scope link  src XXX.XXX.XXX.XXX

XXX.XXX.XXX.XXX/16 dev br0  proto kernel  scope link  src XXX.XXX.XXX.XXX

192.168.1.0/24 dev br0  proto kernel  scope link  src 192.168.1.1

 

VPN uses tun1 so I believe I set it correctly. My NAS is at 192.168.1.6 which need port 5000 to connect to.

 

Any suggestion?

 

 

 

suggestion for what?  it seems you have all the info you need.

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

×
×
  • Create New...