What's new

How long do triggered ports stay open? Can we control this?

  • Thread starter Deleted member 27741
  • Start date
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

I have not but I can tell you that if a connection is established, it will stay even if you delete tge fwding rule (which is what port triggering does). I bet its a vnc config item.

I understand your stance, but I do prefer empirical data. ;)

For what it is worth, the vnc is set to never time out.
 
Looks like multiple pspings do keep the port open.

Next I will check if ssh behaves the same way just so I know whether this behavior is specific to ultravnc or not.
 
VNC connection through a static forward did not time out in 10 minutes.
 
Same port.

It looks like ultravnc is not the culprit. It stays up just fine with a (static) port forward but craps out at 10 minutes with the port trigger.

I am now testing openvpn. Of course, the port stays open with a port forward to my openvpn server inside my lan (not the n66u but an xp computer in the network).

Let's see if the openvpn connection goes down in 10 minutes with port triggering, shall we? :cool::cool:

I decided to use openvpn instead of ssh because I don't run ssh on anything but my router. I want the trigger to be set off by a computer on my LAN just like the ultravnc connection that goes out in 10 minutes was.
 
Last edited by a moderator:
Holy balls. The openvpn connection goes down like clockwork after 10 minutes with the port trigger. That surprises me. I was thinking that ultravnc had to be the culprit despite clear evidence to the contrary (ultravnc does not go down with a port forward).

I am beginning to think the port triggers are hard wired to be open for 10 minutes. Will repeat tests and report back!
 
Last edited by a moderator:
What's in the syslog? OpenVPN does pretty good logging. OpenVPN can also set it's own inactivity timeout.
 
Holy balls. The openvpn connection goes down like clockwork after 10 minutes with the port trigger. That surprises me. I was thinking that ultravnc had to be the culprit despite clear evidence to the contrary (ultravnc does not go down with a port forward).

I am beginning to think the port triggers are hard wired to be open for 10 minutes. Will repeat tests and report back!
I wouldn't be surprised if they are but with data flow *on the triggered port*, it should stay open. I'm very surprised the connection gets sniped though.
 
Ok, this is a relief I suppose. After getting my ducks in a row I found that openvpn works as expected with port triggering- if there is activity the port stays open.

I am unsure why ultravnc is not working at it should. I expect it has something to do with stuff you guys know more about than me. Established connections and what not. ;)

I appreciate the conversation, I learned a few things today. :cool:
 
Last edited by a moderator:
I actually think vnc should work like you want. The 10 minute should be just for connection initiation from the wan. Once that state moves to established, it dhouldn't be impacted by the 10 minutes.

Have you tried adding a keep alive to your vnc ini?

KeepAliveInterval

I'm also guessing the reason it doesn't timeout on a static fwd is because when it detects it no longer is connected, it csn just re-initiate the connection. it cant do that with the trigger.

but if the connection doesn't drop in the first place, it should be fine.
 
Keep alive has been at 30 seconds. I will tinker around with some other settings and see if it will work. Thanks!
 
Well, this got out of control quickly. I modified an old batch file to psping once in awhile to keep the triggered port open. This batch file can be run invisibly with a vbs file. Replace ???? with your port and password. Requires psping (sysinternals) to be in system path, or you could use cd to get around.

Code:
mode con: cols=50 lines=20
@echo off

rem adjust cols and lines to change size of cmd window
rem note mode con line MUST BE FIRST LINE IN BATCH FILE
rem 15 seems to be lowest number that will work

cd "C:\Program Files\uvnc bvba\UltraVNC\"

rem use the port you want to trigger
rem psping will trigger the port open
rem n66u currently holds the port trigger open for 10 minutes
rem some connections will become established and data will
rem continue through iptables established rules when there
rem is activity on the port
rem unfortunately ultravnc does not work correctly with port triggering
rem and konks out after 10 minutes regardless of activity
psping -q -i 0 -n 1 -q -w 0 www.google.com:????

rem use your vncviewer.exe command
start vncviewer.exe -dsmplugin SecureVNCPlugin64.dsm -listen ???? -disablesponsor -askexit -normalcursor -noauto -encoding tight -compresslevel 7 -quality 9 -password ????
set /a counter=0

:loop
ping -n 2 127.0.0.1

rem next line goes to EOF when vncviewer.exe is not a running process
tasklist /FI "IMAGENAME eq vncviewer.exe" | find /I /N "vncviewer.exe" || goto EOF
set /a counter+=1
echo.
echo *************************
echo counter is currently=%counter%
echo *************************
echo.
rem next line controls how many times the loop runs
rem note that ping -n 2 127.0.0.1 waits one second per loop
if %counter%==500 goto psping
goto loop

:psping
rem psping will reset the trigger timer to 0
rem ultravnc times out after 10 minutes with a
rem triggered port so under 10 minutes
rem of looping is required so the
rem connection is not dropped
psping -q -i 0 -n 1 -q -w 0 www.google.com:????
set /a counter=0
goto loop

:EOF
 
Last edited by a moderator:

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top