Using [mxj net.local], what do all of the ethX, netX and pppX mean?

to_the_sun's icon

The help file generates a list of all of these different abbreviations, which represent different IPs on the network. But I don't understand what any of them mean and which are which. I believe what I need to find for my purpose is the Internet facing IP of my router, so a friend in another part of the country can send data to me via either UDPsend or jit.net.send. Might anyone be so kind as to enlighten me?

Jesse's icon

Type "what is my IP address" into Google. If you're on your home wifi network this will show you your public IP.

to_the_sun's icon

Thanks but I'm pretty sure we tried that before and it wasn't so simple. This article

talks about the need of enabling port forwarding on and using the public IP of the router. Besides, that doesn't really answer my question. I need to know how to get the correct IP address automatically, without having to ask Google every time.

Jesse's icon

Port forwarding is another topic. There are many ways to find your public IP programmatically. Here's one using maxurl:

Max Patch
Copy patch and select New From Clipboard in Max.

`

to_the_sun's icon

I see. So you're saying I can use the IP address generated by your patch and have a friend use it to connect to me via UDPsend/receive or jit.net.send/receive over the Internet (not a LAN), no port forwarding or anything else necessary?

Jesse's icon

No, you can derive your public IP address this way. You'd still have to exchange this information with each other so you know which public IP to target.

Port forwarding would need to be configured if you're going to try to connect network nodes that are behind a firewall. That's typically done in the configuration interface of your router, but it would depend on your particular network. Generally this would need to be done at the receiving end of the transmission, or on both sides if you're doing two-way transmissions.

Many routers have a DMZ function which can place your computer outside of the router's firewall. I don't recommend that as a permanent setup, but it does simplify things a bit for this kind of situation.

to_the_sun's icon

Oh okay, thanks for your help. I suppose we would have to tell each other our IPs in the beginning, it's true. But aside from that, it's pretty much a given that we are behind firewalls, so does port forwarding become a necessity then (other than the DMZ option)? Or from our computers are we able to open up a port through the firewall or allow a designated IP through in some other fashion? Generally do both the router and our computers to have their own firewalls?

Jesse's icon

Many computers have software firewalls that can be configured (or turned off) easily. Most routers have their own firewalls and require port forwarding to be configured via a web interface, or the Apple Airport Utility if you're using their router. As far as I know there's no way around this other than the DMZ option.

The reality is that you're just going to have to try it and figure it out for your specific situation.

to_the_sun's icon

Okay, I already figured port forwarding would be part of the process. But getting back to my original question, I had assumed that I would need to give my friend the IP address of my router (or the outermost gateway of my network) and not that of my computer. Or is it the case that there is only one IP address that refers to the whole network and that's "my" IP address as seen from the outside, the same IP that your patch or sites like myexternalIP.com provide?

If so that would explain my confusion. Yeah we will just have to try things out, but in the meantime I thought I might try to educate myself a little. Thanks again.

Jan M's icon

Hi TO_THE_SUN
a while ago i wrote this java class that uses a push service to communicate between max patches across the web. it is not as fast as a direct udp connection but it saves the hassle dealing with ip adresses and port. forwarding. And it works independently from the location of your computers. You might want to take a look at it: https://cycling74.com/tools/jm-pubnub/
jan

Jesse's icon

The public IP of the router is the visible address that is shared between all of the local clients, which are assigned private IP addresses via DHCP when you connect. This is called Network Address Translation (NAT). That way a single public IP address can be shared by many local clients.

If you configure port forwarding on the router then it knows that network activity on a specific port should be forwarded to a specific local client, at a private IP address.

to_the_sun's icon

Okay great! All is clear now.

Jan, that all looks very interesting. I will have to take a look at it.