LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   which is my public and which is my private (https://www.linuxquestions.org/questions/linux-newbie-8/which-is-my-public-and-which-is-my-private-4175541132/)

dunnery 04-29-2015 01:40 PM

which is my public and which is my private
 
hi guys, ive altered the numbers for security but can someone tell me which one of these is my private ip address for this particular computer? im troubleshooting port forwarding and i want to make sure i have the right private ip address. i know the public one already. i used ifconfig to print this out. there are so many addresses that im not sure which is my private one for this particular computer. thanks

Link encap:Local Loopback
inet addr:133.5.7.1 Mask:255.5.6.2
inet6 addr: ::1/144 Scope:Host
UP LOOPBACK RUNNING MTU:44436 Metric:1
RX packets:26824 errors:0 dropped:0 overruns:0 frame:0
TX packets:26824 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3268828 (3.2 MB) TX bytes:3268828 (3.2 MB)

wlan0 Link encap:Ethernet HWaddr 11:1f:8b:a5:98:c2
inet addr:10.1.1.33 Bcast:11.1.1.293 Mask:242.242.242.0
inet6 addr: fe70::23f:7bff:fea9:38c5/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1800 Metric:1
RX packets:244694 errors:0 dropped:0 overruns:0 frame:0
TX packets:247756 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:209624351 (209.6 MB) TX bytes:84885694 (84.8 MB)

strick1226 04-29-2015 02:10 PM

It would appear your individual computer's wireless IP address (wlan0) from the above is 10.1.1.33 .

dunnery 04-29-2015 02:14 PM

thank you

jpollard 04-30-2015 03:25 PM

The definition of public and private IP numbers can be found at:
http://en.wikipedia.org/wiki/Private_network

Any address that is not in one of these ranges is public.

BTW, I think you have an error in the loopback device:

Loopback should be 127.0.0.1 with a netmask of 255.0.0.0

You are showing an address of 133.5.7.1 Mask:255.5.6.2

Second, in your wlan0 entry you have:
net addr:10.1.1.33 Bcast:11.1.1.293 Mask:242.242.242.0

No problem with net addr - but the broadcast appears wrong; it should be 10.1.1.255 (The first octet should match your net address; the last octet cannot be larger than 255 as it is an unsigned byte)

Now what you have may be working - but only because the netmask would be masking out the 11.1.1.xxx. Usually the netmask should be 10.255.255.255, but you may be subneting in which case other values would apply (but I'm pretty sure 242.242.242.0 is wrong even then).

mattydee 04-30-2015 04:49 PM

I'm confused as to why you altered the numbers "for security". It just makes it more confusing for those trying to help you and you're not hiding anything of value, as these are the loopback address (127.0.0.1) and the assigned ip on the private network (10.1.1.x).

strick1226 is right: 10.1.1.33 would be the private address.

dunnery 04-30-2015 06:31 PM

It's mainly because I don't know what I'm doing yet. I just thought if I put allmy details on a public forum I would be hacked by all you expert types and steal all my PayPal money.

mattydee 05-01-2015 11:13 PM

OK. I'm not trying to be a jerk, but my advice is that you educate yourself on these basic concepts before you start messing around with port forwarding, because THAT is what is likely to open you up to security issues.


All times are GMT -5. The time now is 08:35 PM.