How to remote into a server that's behind NAT

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
goofy3785
DD-WRT Novice


Joined: 30 Jun 2022
Posts: 14

PostPosted: Thu Sep 29, 2022 2:32    Post subject: How to remote into a server that's behind NAT Reply with quote
I have a server that bridges the connection between my dd-wrt router and the comcast router. I want to remote into the server that's in the lan to the server that's behind NAT. How do I setup IP forwarding for this?

For example:
my computer connected to my DD-wrt router is 192.168.1.12
and my server that's connected to the wan port of my router is 10.0.0.3

What setting do I modify to reach the server? I tried IP forwarding but it didn't work. As I understand it, it only helps when trying to connect to a client in the lan, not anything behind NAT.
Sponsor
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12837
Location: Netherlands

PostPosted: Thu Sep 29, 2022 7:05    Post subject: Reply with quote
Your network setup is not entirely clear to me.

Do you have a Comcast modem/router which is on subnet 10.0.0.0 and your "server" is on that subnet as is your router (e.g. your routers WAN address is also 10.0.0.x)?

Do you want to reach your "server" from the router or from the Internet?

A drawing with LAN/WAN addresses might help.

You also did not mention the router model and build number

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
goofy3785
DD-WRT Novice


Joined: 30 Jun 2022
Posts: 14

PostPosted: Thu Sep 29, 2022 10:56    Post subject: Reply with quote
egc wrote:
Your network setup is not entirely clear to me.

Do you have a Comcast modem/router which is on subnet 10.0.0.0 and your "server" is on that subnet as is your router (e.g. your routers WAN address is also 10.0.0.x)?

Do you want to reach your "server" from the router or from the Internet?

A drawing with LAN/WAN addresses might help.

You also did not mention the router model and build number

Yes - the server is on the same subnet as the comcast router/gateway hence the 10.0.0.0 subnet(comcast's default is a /24 btw). I am trying to remote into the server from a computer on the inner vlan. Here's a diagram.

client->dd-wrt-router->server->comcast-router/gateway

where the router's both have their own subnet.

In this case I want to reach the server from the router.
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12837
Location: Netherlands

PostPosted: Thu Sep 29, 2022 11:55    Post subject: Reply with quote
If your router has a WAN IP address of 10.0.0.x you should be able to reach the server without a problem.

If your router has another WAN IP address e.g. a Public IP the see:
https://wiki.dd-wrt.com/wiki/index.php/Access_To_Modem_Configuration

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
goofy3785
DD-WRT Novice


Joined: 30 Jun 2022
Posts: 14

PostPosted: Fri Sep 30, 2022 8:45    Post subject: Reply with quote
egc wrote:
If your router has a WAN IP address of 10.0.0.x you should be able to reach the server without a problem.

If your router has another WAN IP address e.g. a Public IP the see:
https://wiki.dd-wrt.com/wiki/index.php/Access_To_Modem_Configuration


I can ping it but cannot remote into it. I have no idea.
WCBonner
DD-WRT Novice


Joined: 15 Mar 2009
Posts: 17

PostPosted: Wed Nov 02, 2022 18:49    Post subject: Reply with quote
goofy3785 wrote:
egc wrote:
Your network setup is not entirely clear to me.

Do you have a Comcast modem/router which is on subnet 10.0.0.0 and your "server" is on that subnet as is your router (e.g. your routers WAN address is also 10.0.0.x)?

Do you want to reach your "server" from the router or from the Internet?

A drawing with LAN/WAN addresses might help.

You also did not mention the router model and build number

Yes - the server is on the same subnet as the comcast router/gateway hence the 10.0.0.0 subnet(comcast's default is a /24 btw). I am trying to remote into the server from a computer on the inner vlan. Here's a diagram.

client->dd-wrt-router->server->comcast-router/gateway

where the router's both have their own subnet.

In this case I want to reach the server from the router.


It looks to me like your comcast router is doing NAT, your server is in a private address space of 10.0.0.0/24, your DDWRT box may also doing NAT to separate your client network from the server network. I see how things are physically connected, but not the network segments of each section, or if the DDWRT is in gateway mode or router mode and configured as a firewall.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum