Port forwarding on Chrome OS

Port forwarding on Chrome OS


Port forwarding on Chrome OS

Linux (Beta) on Chrome OS port forwarding lets developers expose any Linux ports to other devices on the same network, making it easier to test your web applications on different devices. We show you how to enable ports for forwarding and access ports from other devices.

Resources:
More on port forwarding and Web development on Chrome OS → https://goo.gle/3mR3O69
ChromeOS.dev → https://goo.gle/33JkDrQ

Watch more of the Chrome OS Show → https://goo.gle/chromeosshow
Subscribe to Chrome Developers → https://goo.gle/ChromeDevs

#chromeosshow


Content

0.99 -> [Music]
5.759 -> hi
6.16 -> my name is joyce tow and i'm a developer
8.16 -> relations engineer for chrome os devrel
10.96 -> the web is an amazing platform for
12.799 -> developers because it is inherently
14.719 -> device agnostic a big perk is its
16.64 -> ubiquity
17.92 -> that means as a web developer your web
19.84 -> application has a very wide reach of
21.6 -> possible users on phones
23.439 -> tablets laptops and much more to ensure
26.4 -> a seamless experience for all users you
28.48 -> may want to test your app on various
30.08 -> devices and form factors
31.92 -> for example if you are developing a
33.76 -> website on your chrome os
35.28 -> device and recently added a collapsible
37.52 -> navigation drawer
38.879 -> for when the window size is smaller you
40.879 -> can deploy it locally on your chromebook
42.879 -> and see that the drawer works and looks
44.48 -> great on a large screen device
46.48 -> but what about on a phone where the
48.079 -> screen is much smaller and usually in
49.76 -> portrait mode
51.28 -> instead of deploying an unstable and
53.52 -> untested feature to production
55.6 -> you can expose the port on your
57.28 -> chromebook and access it from your phone
59.199 -> as long as it's on the same network
61.68 -> starting on m85
63.199 -> chrome os now makes this easier with
65.04 -> built-in port forwarding in linux beta
67.04 -> on chrome os
68.799 -> you can open your local development
70.4 -> server port so devices on the same
72.479 -> network can access it
75.04 -> the first thing you'll need to do is
76.64 -> make sure you've enabled linux on chrome
78.4 -> os
79.119 -> if you already have it turned on you
80.72 -> should see port forwarding in the linux
82.56 -> beta settings
84.159 -> here you can add ports to be forwarded
86.56 -> when you add a port
87.759 -> you can specify the connection type tcp
90.72 -> or udp
92.079 -> you can also optionally label it for
94.079 -> easier reference
96.079 -> after adding a port you'll see it in the
97.84 -> list here you can then toggle each port
100 -> on and off note that sometimes you will
102.399 -> need to be hosting something at the port
104.159 -> before you can enable it here
106.56 -> when you enable a port you are making
108.399 -> the associated linux port
109.92 -> available to other devices on the same
111.84 -> network that your chrome os
113.439 -> device is on note that even though you
116.079 -> are running your server from the linux
117.759 -> container
118.799 -> it is by default already available and
120.799 -> exposed to chrome os via local host
123.92 -> now that you've set up the ports for
125.439 -> forwarding you'll need the proper ip
127.28 -> address
127.759 -> along with the port to connect to it
129.36 -> from another device
131.28 -> to find the ip address for your chrome
133.12 -> os device go to settings
135.04 -> and under network select the network
137.12 -> your device is on
138.319 -> there you'll see the ip address then on
141.28 -> another device
142.239 -> whether it be a phone tablet or another
144.239 -> chromebook as long as it's on the same
146.319 -> network you can connect by putting the
148.16 -> address in this format
149.52 -> in your browser you'll be able to see
152.239 -> what your app looks like on a different
153.92 -> devices
154.8 -> without doing a full deploy
157.84 -> and that's it if you don't want possible
159.76 -> intruders to access your port
161.68 -> don't forget to disable it once you're
163.28 -> done testing as mentioned
165.519 -> after turning off the port you can still
167.36 -> access the port locally via local host
170.72 -> port forwarding on chrome os is a great
172.64 -> wireless alternative
173.92 -> to similar tools for port forwarding for
176.8 -> example the chrome
177.92 -> devtools port forwarding works great but
180.48 -> only if you have a usb cable
182.4 -> and an android device if you are
184.959 -> developing an
185.68 -> android app port forwarding can also be
187.76 -> used in place of the adb forward
189.84 -> and adb reverse commands which let you
192.239 -> forward requests from your host port to
194.08 -> your device port
195.12 -> and vice versa whether you're a web or
198 -> android developer on chrome os
199.68 -> you can take advantage of chrome os's
201.599 -> built-in port forwarding
203.12 -> to simplify testing on multiple devices
206.159 -> for more information about web
207.599 -> development on and for chrome os
209.92 -> check out chrome os dot dev a dedicated
212.239 -> online resource
213.28 -> for chrome os developers
226.959 -> you

Source: https://www.youtube.com/watch?v=ozLuC0eAMbc