Results 1 to 3 of 3

Thread: Allow SSH on port 443

  1. #1

    Lightbulb Allow SSH on port 443

    Hello!
    Because from university I can only use port 443, I want to use SSH to my router on this port!
    I don't want to change the port the SSH-server listens, because I want to use it from the internal network.
    It works if I add the following IPTABLES rules
    Code:
    iptables -D INPUT -j DROP
    iptables -A INPUT -p tcp --dport 443 -j ACCEPT
    iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 443 -j DNAT --to-destination $4:22
    But then, all ports are open
    If I add
    Code:
    iptables -A INPUT -j DROP
    it doesn't work anymore.
    What do I need to change?

  2. #2
    Join Date
    Mar 2007
    Location
    Budapest / Hungary
    Posts
    79
    Hi!

    Try this code in your post-boot:

    ...
    # Activate SSH
    dropbear -p 22 -p 443
    ...

    And change your post-firewall code:

    ...
    iptables -t nat -A PREROUTING -i $1 -p tcp --dport 22 -j DNAT \
    --to-destination $4:22
    iptables -t nat -A PREROUTING -i $1 -p tcp --dport 443 -j DNAT \
    --to-destination $4:443
    iptabled -A FORWARD -i $1 -o $3 -p tcp --dport 22 -d $4 -j ACCEPT
    iptabled -A FORWARD -i $1 -o $3 -p tcp --dport 443 -d $4 -j ACCEPT
    ...

    You can connet to your router at port 22 and 443, too.

    Bye,
    George

    ps: and sorry my English.

  3. #3
    Thank you!
    It works!

Similar Threads

  1. Port Forwarding Issue
    By Serizzim in forum WL-500g Q&A
    Replies: 2
    Last Post: 21-05-2008, 16:44
  2. Replies: 2
    Last Post: 02-05-2008, 00:34
  3. Port Forwarding to router (ssh, custom ports)
    By thE_29 in forum WL-500gP Q&A
    Replies: 1
    Last Post: 03-09-2007, 15:22
  4. Replies: 1
    Last Post: 07-09-2005, 08:09
  5. Firmware v1.9.2.7 CR1 [Oleg]
    By Oleg in forum WL-500g Firmware Releases
    Replies: 53
    Last Post: 13-04-2005, 23:26

Tags for this Thread

Posting Permissions

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