Access SMB over a custom port

6,583

SMB is generally not a protocol used over the internet. You should set up a VPN between your client (laptop?) and AWS and tunnel SMB through the VPN. Then you won’t have to worry about ISPs blocking port 445, won’t need the AWS fileserver open to the world and also will have an extra layer of security. There are many options for VPNs, both open source and commercial.

Hope that helps :)

Share:
6,583

Related videos on Youtube

SynAck
Author by

SynAck

Learning.

Updated on September 18, 2022

Comments

  • SynAck
    SynAck almost 2 years

    I have the fileserver hosted on AWS. I was using smb port 445 to access the fileserver. I found out that some ISPs have blocked port 445, so I set up my fileserver instance behind AWS network load balancer and create a custom listener port on NLB and forward the request on this port to fileserver instance on 445. But windows share uses port 445 by default, so is there a way to make a request to nlb on a custom port and indirectly to my fileserver since I have a forward rule on NLB. Is this possible?

    Note: I know that there is no syntax for alternate ports on windows share. I am looking for a workaround

    • aardbol
      aardbol about 4 years
      You could do port forwarding with a firewall, e.g. forward port public port 4455 to 445 internally
    • SynAck
      SynAck about 4 years
      I can give the public IP of my NLB to windows share. It will access NLB on 445(this is by default and can't be changed) but you are saying that I can do port forwarding on my firewall. So now the firewall will change the request to NLB:4455. I have listener on nlb at 4455 and this will forward the request to fileserver on 445,right?
    • aardbol
      aardbol about 4 years
      I don't know what your topology looks like but if your firewall is in front of your NLB, you can set up the port forwarding there so that your firewall will redirect the requests from 4455 public to port 445 on your NLB and that NLB will forward the traffic again to port 445 of the hosts.
    • Massimo
      Massimo about 4 years
    • SynAck
      SynAck about 4 years
      @Massimo it doesn't. I am looking for a workaround.
    • Massimo
      Massimo about 4 years
      @Ali I know, but there is also no support on the client side; even if you place a load balancer performing a port forwarding in front of the file server, there is no way to tell the client to connect to a different port.
  • Deb
    Deb about 3 years
    Link-only answers rot over time, several of mine have. Please add some content to this answer so it can stand alone in case the link-target goes away. We have 12 year old ServerFault questions on here, so you need to plan for that sort of longevity.