Jump to content

Accessing local FTP server through external IP bandwidth usage

Ambicky Burger
Go to solution Solved by brwainer,

Accessing a local server from a local client via the external IP is called "Hairpin NAT". The router should handle it locally, I can't really see any setup where it would send out to the default gateway then come back. Actually if it made it to the ISP, the packet would probably just be dropped since the source IP would be a private IP address which is non-routable on the internet.

Hi all,

 

I currently have a raspberry pi hooked up to my external drive which holds all of my media. I set up an ftp server and forwarded the correct port in my router.

All is well and I can perfectly access my external drive from anywhere in the world using my external ip adress. Here comes the question:

 

If I am connected to the local network in which the FTP server is located, but I access it through the external IP (instead of the local ip address), will it use up any of my limited monthly internet bandwidth (100 GB)?

Or should the router be smart enough to route all traffic locally, not affecting my monthly bandwidth?

 

Very curious for the answer!

Link to comment
Share on other sites

Link to post
Share on other sites

it depends on what your router does exactly, and where the bandwidth is counted.

Link to comment
Share on other sites

Link to post
Share on other sites

If you are in the same network, you do not need to use the external IP and it wouldn't use the bandwidth if you used the local address.

HAL9000: AMD Ryzen 9 3900x | Noctua NH-D15 chromax.black | 32 GB Corsair Vengeance LPX DDR4 3200 MHz | Asus X570 Prime Pro | ASUS TUF 3080 Ti | 1 TB Samsung 970 Evo Plus + 1 TB Crucial MX500 + 6 TB WD RED | Corsair HX1000 | be quiet Pure Base 500DX | LG 34UM95 34" 3440x1440

Hydrogen server: Intel i3-10100 | Cryorig M9i | 64 GB Crucial Ballistix 3200MHz DDR4 | Gigabyte B560M-DS3H | 33 TB of storage | Fractal Design Define R5 | unRAID 6.9.2

Carbon server: Fujitsu PRIMERGY RX100 S7p | Xeon E3-1230 v2 | 16 GB DDR3 ECC | 60 GB Corsair SSD & 250 GB Samsung 850 Pro | Intel i340-T4 | ESXi 6.5.1

Big Mac cluster: 2x Raspberry Pi 2 Model B | 1x Raspberry Pi 3 Model B | 2x Raspberry Pi 3 Model B+

Link to comment
Share on other sites

Link to post
Share on other sites

It "should" do it locally, but it depends on how the router handles that traffic, if it has dd-wrt or similar firmware you can check that bandwidth allocation

Link to comment
Share on other sites

Link to post
Share on other sites

Your Pi has a local IP, if you access it through the local IP you will not use your bandwidth cap.

 

If you port forward it and access it through your public IP then yes, you will use your bandwidth.

Primary Build: i7-4790 · 16GB Hynix DDR3-1600 · Sapphire Tri-X R9 390x · NZXT S340 · Win10 Pro · Seagate Barracuda 1TB T_T

Portable: 2015 Retina Macbook Pro 13" · i5-5257u · 512GB PCIe SSD · Intel Iris 6100 T_T

If my post helped you, please rate it!

Link to comment
Share on other sites

Link to post
Share on other sites

Accessing a local server from a local client via the external IP is called "Hairpin NAT". The router should handle it locally, I can't really see any setup where it would send out to the default gateway then come back. Actually if it made it to the ISP, the packet would probably just be dropped since the source IP would be a private IP address which is non-routable on the internet.

Looking to buy GTX690, other multi-GPU cards, or single-slot graphics cards: 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Given the nature of networking, I believe the router will see that the packets destination is to itself, and will thus deliver them directly to itself, and then forward it to the raspberry pi. The ISP will see none of it.

 

I've noticed that when I do this with my router (Asus RT-N66U), it's NATing it with it's own internal IP.

Link to comment
Share on other sites

Link to post
Share on other sites

  • 2 weeks later...
On 2/29/2016 at 9:58 PM, brwainer said:

Accessing a local server from a local client via the external IP is called "Hairpin NAT". The router should handle it locally, I can't really see any setup where it would send out to the default gateway then come back. Actually if it made it to the ISP, the packet would probably just be dropped since the source IP would be a private IP address which is non-routable on the internet.

Thanks, that's what I was guessing but I wasn't sure. Never heard of Hairpin NAT before.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×