Mirukai
Posts: 8
Joined: Sat Apr 16, 2016 12:25 pm
Location: Milton Keynes, England.
Contact: Website

My RPi2's Public IP is the same as my laptop's!

Tue Jul 05, 2016 3:31 pm

As you can tell from the title, this is very annoying when setting up Dynu DNS, as it automatically routes to my laptop, which has no server software on it, instead of my Pi, which has Apache2 and a Minecraft Server on.

I did on my Pi:

Code: Select all

wget http://ipecho.net/plain -O - -q | pico plain
And it gave me 188.220.74.40, and then I went to IPChicken.com on my laptop and it gave me the same.

When you navigate to the IP, which I don't mind you doing, it puts you on the Apache2 Debian Default Page, but when using a DNS, it gets confused between the two devices! Please help me out!!

Thanks,
Mirukai

ghans
Posts: 7883
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: My RPi2's Public IP is the same as my laptop's!

Tue Jul 05, 2016 3:37 pm

This is normal. Your home router does NAT just like
it was designed to.

Simply set up port forwarding correctly in your routers
control panel and Dynamic DNS will work (outside your
home network at least - some home routers don't support NAT
loopback).

You should always test your dynamic DNS setup
from a public library , Starbucks or over 3G.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

Mirukai
Posts: 8
Joined: Sat Apr 16, 2016 12:25 pm
Location: Milton Keynes, England.
Contact: Website

Re: My RPi2's Public IP is the same as my laptop's!

Tue Jul 05, 2016 4:00 pm

I have a Sky Router, any way to do that NAT Loopback you're talking about on that?

ghans
Posts: 7883
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: My RPi2's Public IP is the same as my laptop's!

Tue Jul 05, 2016 4:07 pm

"NAT loopback" or "NAT hairpin" is a router feature (and
it should be enabled by default ?!). You need the router
manual/product brief to know if your router has it.

Check your ISP website for router manuals (good luck) or
ask your ISP hotline. Perhaps you can use manuals for
the orginal "base" model your router was rebranded from.

Using services like "is this website down" or
"Online Port Scanners" is probably easier ... or lend or beg
a smartphone with 3G and test it that way.

ghans
Last edited by ghans on Tue Jul 05, 2016 4:24 pm, edited 1 time in total.
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

Mirukai
Posts: 8
Joined: Sat Apr 16, 2016 12:25 pm
Location: Milton Keynes, England.
Contact: Website

Re: My RPi2's Public IP is the same as my laptop's!

Tue Jul 05, 2016 4:19 pm

Ah, cheers, but now I have another problem... My Apt-get is broken...

This is the error it throws at me.

Code: Select all

root@raspberrypi:/var/www/html# sudo apt-get install vsftpd
Reading package lists... Error!
W: Encountered status field in a non-version description
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/dpkg/status
E: The package lists or status file could not be parsed or opened.
 
AGH!! What now?!

FlexibleSigmoid
Posts: 61
Joined: Sun Jul 03, 2016 1:33 am

Re: My RPi2's Public IP is the same as my laptop's!

Tue Jul 05, 2016 6:58 pm

Learn to search for your error messages, there's a ton of resources available if you Google the last error line.

Mirukai
Posts: 8
Joined: Sat Apr 16, 2016 12:25 pm
Location: Milton Keynes, England.
Contact: Website

Re: My RPi2's Public IP is the same as my laptop's!

Tue Jul 05, 2016 7:41 pm

Yup, googling last error message helped me, thanks! I will do this from now on.

User avatar
DougieLawson
Posts: 39862
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: My RPi2's Public IP is the same as my laptop's!

Tue Jul 05, 2016 9:29 pm

BTW, whatever you do, DO NOT open ports 20/21 to the public internet.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

Mirukai
Posts: 8
Joined: Sat Apr 16, 2016 12:25 pm
Location: Milton Keynes, England.
Contact: Website

Re: My RPi2's Public IP is the same as my laptop's!

Mon Jul 11, 2016 3:40 pm

Why should I leave port 20 closed? I know FTP is meant to be secure, but why 20?

epoch1970
Posts: 5589
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: My RPi2's Public IP is the same as my laptop's!

Mon Jul 11, 2016 5:00 pm

FTP active uses both 20/tcp and 21/tcp.
You can lookup ports for well-known protocols in /etc/services or over the internet.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

User avatar
DougieLawson
Posts: 39862
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: My RPi2's Public IP is the same as my laptop's!

Tue Jul 12, 2016 6:06 pm

Mirukai wrote:Why should I leave port 20 closed? I know FTP is meant to be 100% totally, completely insecure, but why 20?
FTFY

If you need to accept files from the public internet use sshd/sftp or Apache2 with libcommons-fileupload

Both of those actually have a semblance of security.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

mfa298
Posts: 1386
Joined: Tue Apr 22, 2014 11:18 am

Re: My RPi2's Public IP is the same as my laptop's!

Wed Jul 13, 2016 8:14 am

DougieLawson wrote:
Mirukai wrote:Why should I leave port 20 closed? I know FTP is meant to be 100% totally, completely insecure, but why 20?
FTFY

If you need to accept files from the public internet use sshd/sftp or Apache2 with libcommons-fileupload

Both of those actually have a semblance of security.
Although please change the pi users password first (and ideally create a new user and remove the pi user). Personally I'd also suggest not running ssh on port 22.

Having a pi with ssh on port 22 and the default pi:raspberry credentials accessible to the internet is arguably less secure than ftp. SSH is only as secure as it's been set up to be, if the credentials are easily guessable it's not very secure.

Return to “Troubleshooting”