How to port forward through LAN and WAN

I have Yun connected to internet over WIFI (LAN) and my PC connected to Yun over ethernet cable [WAN]. Thanks this forum i have internet connection on my PC . I would like port forward through Yun to my PC. I can set port forwarding in my router if i have access internet directly from router but i do not know how to set port forwarding through Yun module ? I try different setting port forwardig in control panel but without success.

hankk:
::::SNIP::::
I can set port forwarding in my router if i have access internet directly from router but i do not know how to set port forwarding through Yun module ? I try different setting port forwardig in control panel but without success.

@hankk,
YunOS is based on OpenWRT, which is based on Linux. If you google OpenWRT and port forward, you will get quite a few answers.

This one will likely work: Port Forwarding

Let us know how it works out.
Jesse

I try this simple settings but did not work. I am wondering why i can not see Yun in my router maybe this is reason.

hankk:
I try this simple settings but did not work. I am wondering why i can not see Yun in my router maybe this is reason.

@hankk,

Okay, The following a canned answer.

= [Q:] I cannot connect to My Arduino Yún. What do I do? =

First it’s good to know, when Arduino Yun cannot find the AP you have set it for (like your home wifi), it has a script that puts it back into default SSID and AP mode.

Next, you may have already watched this video, but it’s worth watching again. Pay extra attention to the part with the sketches.
Getting started with Arduino Yún - tutorial (6:53)

Then, read the short instructions immediately below. We (the volunteer support group) already know these steps by heart, so be familiar with the different reboot methods, and especially the 30+ second wifi reset. Also, not mentioned on that page, if you reset the Wifi/Linux part of the Yun, it will take from 2-8 minutes for the reboot. Lastly on this part, YOU MUST WAIT for the Linux portion to fully boot BEFORE YOU PRESS ANY of the RESET buttons.

Resetting the processors (AR9331, WiFi, and 32U4)

Then start over, plug your Yun into the USB port, run this sketch, and hit the ‘‘Wifi Reset button’’ (for 5-10 seconds).

The YunSerialTerminal provides a simplified console access to the Linux part of the Yun. It works via the USB port (the one that powers the Yun - the microUSB). From there you’ll be able to run a few commands to give us a better idea of problems.

Also, be ready with this sketch YunWiFiStatus. This sketch will help us see the status of your home AP. The sketch prints the wifi status to the console every 5 seconds or so. This sketch might seem familiar as it was in that first video link (above).

Let us know how it goes.
Post results from the YunSerialTerminal, if you are still having problems.
Please use markup when posting results. (See attached image)

Jesse

arduino_markup.png

It is misunderstanding i do not have problem to connect Yun to any network. I do not see name of Yun in my router settings despite i have active connetion to this router.

I do not know should i see it or not. My problem is port forwarding through Yun LAN and then Yun WAN to my computer.

hankk:
::::SNIP::::

I do not know should i see it or not. My problem is port forwarding through Yun LAN and then Yun WAN to my computer.

@hankk,
I got that the first time. I got it that your router does NOT see your Yun.

In those instruction I provided, at the bottom, there is a sketch YunWiFiStatus. You need to be ready to run that.

But first - with the YunSerialTerminal, what results did you get in the Monitor Window? Are you getting some output? If so, can you log that output and post it?

Then try, the YunWiFiStatus. It will tell us the status of your Radio and the Wifi on you Yun. Please be ready to post that information also.

NOTE: if you have NOT read the previous instructions I gave you, your are going to trip (and not make any forward progress).

HERE IS THE KEY PART
First it's good to know, when Arduino Yun cannot find the AP you have set it for (like your home wifi), it has a script that puts it back into default SSID and AP mode.

If your Yun is in the default (factory) mode, your router will never see it, because it is NOT CONNECTED TO IT.

Best of Luck,
Jesse


YunSerialTerminal has typical screen at beginning and root@Arduino prompt.

hankk:
::::SNIP::::
YunSerialTerminal has typical screen at beginning and root@Arduino prompt.

@hankk,
excellent.
Your Yun is name 'agus'.
It is in 'Client' mode.
It has a strong signal of 84%
It has an IP of 192.168.2.100

Please run the YunSerialTerminal and in the input box, at the top of the window, type ifconfig. Capture the output and let us know what it says. You should be able select, copy, cut, & paste.

The Good news is your Yun is connected to A router; we presume it is your router.
After this, we will setup your port forwarding.

TIA
Jesse

OP:

If you have Yun connected to internet over WIFI (LAN) and my PC connected to Yun over ethernet cable [WAN] via this method, Yun is DHCP client of WIFI (LAN) and port forward is not supported.

sonnyyu:
Share internet connection over ethernet cable

jessemonroy650:
Your Yun is name 'agus'.

I think you meant to say that the Yun is connected to the network named 'agus'

We can't tell the Yun's name from the posted information.

sonnyyu:
OP:

If you have Yun connected to internet over WIFI (LAN) and my PC connected to Yun over ethernet cable [WAN] via this method, Yun is DHCP client of WIFI (LAN) and port forward is not supported.

Are you sure there is no way to port forward in this configuration? You can save lot of my time.
My Yun is DHCP client wifi network “agus”. Port forward over WIFI(LAN) is not at all supported or only in my configuration (WIFI network ->Yun WIFI (LAN)->Yun (WAN) ->my PC)?

root@Arduino:/# ifconfig
eth1 Link encap:Ethernet HWaddr 90:A2:DA:F9:02:FA
inet addr:192.168.241.1 Bcast:192.168.241.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:898 errors:0 dropped:107 overruns:0 frame:0
TX packets:713 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:104679 (102.2 KiB) TX bytes:430888 (420.7 KiB)
Interrupt:4

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:16 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1648 (1.6 KiB) TX bytes:1648 (1.6 KiB)

wlan0 Link encap:Ethernet HWaddr 90:A2:DA:F1:02:FA
inet addr:192.168.2.100 Bcast:192.168.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:770 errors:0 dropped:64 overruns:0 frame:0
TX packets:411 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:32
RX bytes:474408 (463.2 KiB) TX bytes:35583 (34.7 KiB)

ShapeShifter:
I think you meant to say that the Yun is connected to the network named 'agus'

We can't tell the Yun's name from the posted information.

Yep. Thanks.