ddwrt port forward to 127.0.0.1

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


Joined: 16 Jan 2018
Posts: 2

PostPosted: Thu Jun 21, 2018 6:19    Post subject: ddwrt port forward to 127.0.0.1 Reply with quote
My router has static public IP. I have stunnel client installed on my router. I have stunnel server installed on my cloud VPC. I connect my router vpn client to VPC VPN server through stunnel. that works fine. I want to connect my ios device vpn through my router stunnel client both from lan and wan.
Stunnel client is listening at port 7654. I want to expose this port for both lan client and wan. So that my mobile devices can use stunnel client both from home(lan) and outside(wan).

I have tried port forward solution. i can forward wan port to any lan client but i can not forward wan port of router to localhost(127.0.0.1).

Please help
Sponsor
SilverstarX
DD-WRT User


Joined: 23 Jan 2008
Posts: 139

PostPosted: Thu Jun 21, 2018 11:02    Post subject: Reply with quote
Have you tried forwarding to the lan address of your router? Assuming the default, 192.168.1.1 ?
yrahman
DD-WRT Novice


Joined: 16 Jan 2018
Posts: 2

PostPosted: Thu Jun 21, 2018 11:38    Post subject: Reply with quote
SilverstarX wrote:
Have you tried forwarding to the lan address of your router? Assuming the default, 192.168.1.1 ?


Yes tried that but it is not working
SilverstarX
DD-WRT User


Joined: 23 Jan 2008
Posts: 139

PostPosted: Thu Jun 21, 2018 14:09    Post subject: Reply with quote
Is the stunnel listening on 192.168.1.1:7654 or only on 127.0.0.1:7654 ? So, are you able to connect from lan? If not, you need to amend the stunnel config to allow that.

If yes, maybe port forwards to itself are not possible due to *reasons* - I'm not an expert on that topic. There might be a way using iptables.
SilverstarX
DD-WRT User


Joined: 23 Jan 2008
Posts: 139

PostPosted: Sat Jun 23, 2018 6:09    Post subject: Reply with quote
eibgrad wrote:
FYI.

0.0.0.0 is NOT a valid source net. It should be 0.0.0.0/0


I just checked on my router, all my source net fields are blank so maybe there shouldn't be an entry if not restricted.
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12917
Location: Netherlands

PostPosted: Sat Jun 23, 2018 8:43    Post subject: Reply with quote
Some recent builds had a bug, before the bug leaving the source net field blank worked (it added 0.0.0.0/0) recent builds worked only if you added 0.0.0.0/0, but maybe the bug is resolved and leaving blank works again
_________________
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
blaser
DD-WRT Guru


Joined: 16 Jul 2006
Posts: 525

PostPosted: Sat Jun 23, 2018 15:48    Post subject: Reply with quote
just run the following command at startup
iptables -I INPUT 1 -p tcp --dport 7654 -j ACCEPT

_________________
Netgear R9000 main router
RAX80 as AP
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