Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: How to remove telnet from OS X 10.8 ??

  1. #1
    Join Date
    Jul 2012
    Location
    SuperUserLand
    Posts
    538

    Question How to remove telnet from OS X 10.8 ??

    I know this is hardly the most appropriate forum but it's the only computer one I'm registered in and I don't frequent apple forums so my question is:


    I would like to disable the ability to use the tenet command on the Mac OS X 10.8 terminal.

    What do I have to do, what specific file do I have to delete ?? it's in system ? library->??

    Also on mountain lion why is there no option to turn IPv6 off?? it only shows me link-local or wtf

  2. #2
    Join Date
    Apr 2010
    Posts
    1,946

    Default

    Just throwing some ideas... I don't know macosx at all. Try locating telnet via "whereis" equivalent. Then move the binary out as "telnet_" and compile a dummy C binary, like
    int main(void){return 0;}
    and call it telnet; so every time telnet is called it always succeeds, but nothing really happens.

  3. #3
    Join Date
    Jul 2012
    Location
    SuperUserLand
    Posts
    538

    Default

    os x is just a rebranded bsd, terminal command seem to all work the same.


    I found a way, I have to edit the 'services' file and put a # on telnet


    but the fucking thing says 'You don't own this file'


    fucking mac

  4. #4
    Join Date
    Jul 2008
    Location
    Greece
    Posts
    3,801

    Default

    Quote Originally Posted by Pallidus View Post
    os x is just a rebranded bsd, terminal command seem to all work the same.


    I found a way, I have to edit the 'services' file and put a # on telnet


    but the fucking thing says 'You don't own this file'


    fucking mac
    I don't see how it's different from Linux. You need to edit it as root with "sudo".

  5. #5
    Join Date
    Jul 2012
    Location
    SuperUserLand
    Posts
    538

    Default

    I know Real the problem is that sudo nanoing the 'services' file on the terminal is a fucking pain

    it has like 6000 lines and you have to arrow scroll etc...

    is there any other way???

    also what blocks should I block, telnet , ssh, but what others do hackers use for remote logins and code execution

    basically I just need 80 and 443 all other ports can be blocked but # a million lines :/

  6. #6
    Join Date
    Jul 2008
    Location
    Greece
    Posts
    3,801

    Default

    The Firewall has a GUI, so use that instead if you want to block ports. The file you're trying to edit is for service processes, not ports.

  7. #7
    Join Date
    Oct 2012
    Posts
    2

    Default

    You do not need to delete anything.

    Make a backup copy of /etc/services, then simply block the telnet service ports with a comment #.

    #telnet 23/udp
    #telnet 23/tcp

  8. #8
    Join Date
    Apr 2010
    Posts
    1,946

    Default

    Quote Originally Posted by keirawatson View Post
    You do not need to delete anything.

    Make a backup copy of /etc/services, then simply block the telnet service ports with a comment #.

    #telnet 23/udp
    #telnet 23/tcp
    He already said that in post 3.

  9. #9
    Join Date
    Jul 2012
    Location
    SuperUserLand
    Posts
    538

    Default

    I blocked ssh and telnet, now I have to find shit like samba and those services that the ukrainians so love to exploit.


    to use nano in os x's terminal with a file the size of 'services' is a fucking pain....

    is that 'vim' thing working in os x's terminal?

    anyway to edit this file using a normal text editor?

  10. #10
    Join Date
    Sep 2008
    Posts
    244

    Default

    Quote Originally Posted by Pallidus View Post
    is that 'vim' thing working in os x's terminal?
    Yes. However you can install a graphical version of vim for OS X:

    http://code.google.com/p/macvim/

    Quote Originally Posted by Pallidus View Post
    anyway to edit this file using a normal text editor?
    Do you think about TextEdit?

    sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit filename
    Last edited by gbudny; 10-31-2012 at 06:44 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •