Tuesday, 4 December 2018

macos - Grant access to my local computer form outside


I am on OS X El Capitain 10.11.5.
Trying to run web server locally and grant access from somewhere outside.
In order to get access to Internet I use wifi spot.
Firewall is unavailable on my Mac computer.


ifconfig


lo0: flags=8049 mtu 16384
options=3
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
nd6 options=1
gif0: flags=8010 mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8863 mtu 1500
ether f4:5c:89:90:96:7d
inet6 fe80::f65c:89ff:fe90:967d%en0 prefixlen 64 scopeid 0x4
inet 10.37.44.92 netmask 0xfffffc00 broadcast 10.37.47.255
nd6 options=1
media: autoselect
status: active
en1: flags=963 mtu 1500
options=60
ether 6a:00:01:80:39:90
media: autoselect
status: inactive
en2: flags=963 mtu 1500
options=60
ether 6a:00:01:80:39:91
media: autoselect
status: inactive
p2p0: flags=8843 mtu 2304
ether 06:5c:89:90:96:7d
media: autoselect
status: inactive
awdl0: flags=8943 mtu 1484
ether 9a:46:fc:f3:8c:a2
inet6 fe80::9846:fcff:fef3:8ca2%awdl0 prefixlen 64 scopeid 0x8
nd6 options=1
media: autoselect
status: active
bridge0: flags=8863 mtu 1500
options=63
ether f6:5c:89:09:14:00
Configuration:
id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
ipfilter disabled flags 0x2
member: en1 flags=3
ifmaxaddr 0 port 5 priority 0 path cost 0
member: en2 flags=3
ifmaxaddr 0 port 6 priority 0 path cost 0
nd6 options=1
media:
status: inactive
vboxnet0: flags=8943 mtu 1500
ether 0a:00:27:00:00:00
inet 192.168.99.1 netmask 0xffffff00 broadcast 192.168.99.255

As you can see my computer ip address inside wifi network is 10.37.44.92


At the same time Google shows that my public IP is 77.88.196.39


That's how I run the web server:


dmac:solidus-sample dob$ rails s -p 3001
=> Booting WEBrick
=> Rails 4.2.7 application starting in development on http://localhost:3001
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[2016-08-09 15:32:15] INFO WEBrick 1.3.1
[2016-08-09 15:32:15] INFO ruby 2.2.4 (2015-12-16) [x86_64-darwin15]
[2016-08-09 15:32:15] INFO WEBrick::HTTPServer#start: pid=16366 port=3001

I would like to get access to my web server by http://77.88.196.39:3001. But now it's not accessible though.


What have I done?


When I run the web server in such way (-b key means binding):


rails s -p 3001 -b 10.37.44.92

I can access to http://10.37.44.92:3001 from any computer inside the same Wifi network.


But no successful access to the web server from Internet.
Thanks.



Answer



I think you need port forward to be viable on outside. For example you address is : 192.168.1.21 and you want provide you web server on outside, you need check you public IP, in your case it is 77.88.196.39. So for open web you must open port 80 on your router. You need go to router setting find window with a port forwarding or some think sounds like that. And next put you local adres 192.168.1.21 and add port 80 and click save. Now you web should be viable on outside. If you don't have access to router contact with your network administrator.


In your case, You must open 3001 port on router


No comments:

Post a Comment

Where does Skype save my contact&#39;s avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...