Access my server through my public ip
Access my server through my public ip
Hello
I installed CentOS server 7 on a dell server, I can access apache through local ip from server, 192.168.100.50.
But I want to access apache files remote through my public ip 92.85.60.x, is this possible? and what should I do?
Thank you!
I installed CentOS server 7 on a dell server, I can access apache through local ip from server, 192.168.100.50.
But I want to access apache files remote through my public ip 92.85.60.x, is this possible? and what should I do?
Thank you!
Re: Access my server through my public ip
I would guess that you have to setup your router to route http traffic to your server.
Re: Access my server through my public ip
Can I do this from ifcfg-em1 in /etc/sysconfig/network-scripts/ ?tunk wrote:maybe is
My configurations are here:
Code: Select all
TYPE="Ethernet"
PROXY_METHOD="none"
BROWSER_ONLY="no"
BOOTPROTO="dhcp"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
NAME="em1"
UUID="213846b-efa-495-86b-d137"
DEVICE="em1"
ONBOOT="yes"
ZONE=public
and my public ip is 95.77.153.x
Does anyone have any idea?
Last edited by vestea on 2018/02/09 13:23:14, edited 1 time in total.
-
- Posts: 519
- Joined: 2012/06/26 14:20:47
Re: Access my server through my public ip
No. You will have to forward the relevant ports on your router to your server.
Re: Access my server through my public ip
In my ISP router config?stevemowbray wrote:No. You will have to forward the relevant ports on your router to your server.
-
- Posts: 519
- Joined: 2012/06/26 14:20:47
Re: Access my server through my public ip
Whoever controls your router would have to do it, if that is what you are asking.
Re: Access my server through my public ip
Ok my router is a asus RT-AC87Ustevemowbray wrote:Whoever controls your router would have to do it, if that is what you are asking.
In what section should I configure?
-
- Posts: 519
- Joined: 2012/06/26 14:20:47
Re: Access my server through my public ip
First it would be a good idea to manually assign a fixed IP address to your server on that page, so that you know that it won't change.
Then find the section that deals with port forwarding and forward ports 80 and/or 443 (depending on whether you're doing http and/or https) to your server. I don't have an Asus router so I can't tell you where that section is to be found.
Then find the section that deals with port forwarding and forward ports 80 and/or 443 (depending on whether you're doing http and/or https) to your server. I don't have an Asus router so I can't tell you where that section is to be found.
Re: Access my server through my public ip
I found something Virtual Server/Port Forwarding.stevemowbray wrote:First it would be a good idea to manually assign a fixed IP address to your server on that page, so that you know that it won't change.
Then find the section that deals with port forwarding and forward ports 80 and/or 443 (depending on whether you're doing http and/or https) to your server. I don't have an Asus router so I can't tell you where that section is to be found.
Re: Access my server through my public ip
I set up in /etc/sysconfig/network
and in /etc/hosts
I hope I did right.
Code: Select all
HOSTNAME=mysite.com
Code: Select all
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.x mysite.com localserver