Reply
Thread Tools
macey's Avatar
Posts: 283 | Thanked: 276 times | Joined on Aug 2011 @ uk or @Pai,Mae Hong Son, Thailand
#31
Originally Posted by bingomion View Post
A better place to put that command is the if-up.d eg:
/etc/network/if-up.d/00_startreverse.sh
/etc/network/if-down.d/00_stopreverse.sh
Ok thanks for that. Can understand what would go in startreverse.sh.

Do you have any suggestions what to put in stopreverse.sh.?

Last edited by macey; 2012-07-03 at 07:57.
 
macey's Avatar
Posts: 283 | Thanked: 276 times | Joined on Aug 2011 @ uk or @Pai,Mae Hong Son, Thailand
#32
Originally Posted by bingomion View Post

A better place to put that command is the if-up.d eg:
/etc/network/if-up.d/00_startreverse.sh
/etc/network/if-down.d/00_stopreverse.sh

Thanks again
Ok, have got reverse tunnelling working ok.
my script is in revtun.sh
In
/etc/network/if-up.d/00_startreverse.sh
I have #!/bin/sh
nohup /usr/bin/revtun.sh >/home/user/revtun.out 2>&1


This doesn't seem to work on startup, However, if do:-
Code:
-bash4-4.2$ /etc/network/if-up.d/00_startreverse.sh
Tunnel starts fine. Anyone tell me what I'm doing wrong please?

Here is the code of revtun.sh:-

Code:
#!/bin/bash4
#
while true;
do
	echo "Running ssh: "`date +"%T, %a (%F)"`;
	ssh  -p 26550   -R 3333:localhost:30550 -Nnqg mydomain.com -l richard ServerAliveInterval=30
	sleep 600
done
FIXED...
Using this instead:-
http://wiki.maemo.org/Reverse_ssh
Works fine...

Last edited by macey; 2012-07-03 at 11:43.
 

The Following User Says Thank You to macey For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 07:52.