PDA

View Full Version : Telnet on another port



IceTIceT
15-02-2005, 13:55
How can i change the telnet-server port (23 to e.g. 9023)?
I am using firmware version 1.8.1.7-3

I changed "/etc/services" (incl. save & commit with flashfs), but the telnet-server port did not change.

Thanks for help!

Oleg
15-02-2005, 14:04
How can i change the telnet-server port (23 to e.g. 9023)?
I am using firmware version 1.8.1.7-3

I changed "/etc/services" (incl. save & commit with flashfs), but the telnet-server port did not change.

Thanks for help!

Add these lines to post-boot:


killall telnetd
telnetd -p 9023

IceTIceT
15-02-2005, 15:32
I've created the file
"/usr/local/init/post-boot",
pasted the two lines (see above) and set the rights with
"chmod +x /usr/local/init/post-boot".

After using "flashfs save", "flashfs commit", "flashfs enable" and rebooting the file is still there, but the telnet-server-port did not change.

If I want to execute "post-boot" from command-line in the correct directory, it returns:
"-sh: post-boot: not found"

Where is the mistake?

Add:
If I start a second telnetd and then kill the other, it works (until reboot).

Oleg
15-02-2005, 15:39
Where is the mistake?
sbin vs init, #!/bin/sh

Read http://oleg.wl500g.info page carefully.

IceTIceT
15-02-2005, 16:25
Excuse me, I am too stupid ;)!

I repeated all from
http://oleg.wl500g.info/
step by step and now it works.

As you said: post-boot was not in the correct directory and "#!/bin/sh" was missing.

Thanks for your fast and excellent help!