ISP로부터 고정 IP 주소를 받았으며 Ubuntu가 설치된 가정용 랩톱에 작은 실험용 서버를 설정하려고합니다.
내부 고정 IP 주소를 사용하도록 Ubuntu를 설정했습니다 192.168.1.11
.
라우터의 포트 번호를 전달하여 포트의 모든 요청 80
을 192.168.1.11
.
아래는 내 라우터 ( D-Link DSL-2750U ) 구성입니다.
Ubuntu 상자의 포트 K에서 작은 Java 웹 서버를 시작했습니다. 하지만 내 ISP에서 제공하는 고정 IP를 사용하여 외부 네트워크에서 웹 서버에 액세스 할 수 117.218.XXX.XXX
없습니다 192.168.1.11
. 내가 놓친 것이 있습니까?
UPDATE: As per suggestion from JakeGould I have updated the remote ip address of router to public IP address of 117.218.XXX.XXX
.
After making above configuration I could actually visit my server from browser. But browser was opening router configuration page instead of redirecting the request to Ubuntu box. So now I changed the default port of User Access Control for D link router.
Now the request is getting timed out. Below is the output of curl
curl http://117.218.XXX.XXX
curl: (7) couldn't connect to host
So I tried disabling the firewall on Ubuntu box using "sudo ufw disable"
But issue persist.
I am not sure configuration changes required on Dlink , Below is the config page of Dlink firewall
Can someone please help me with it.
According to the screenshots you are showing, you have port forwarding oddly set on your WAN connection as follows:
The way you have that setup basically tells the router to just route all traffic from 192.168.1.11
on port 80
to 192.168.1.11
on port 80
which makes no sense. The “Remote IP:” should be set to your external IP address of 117.218.XXX.XXX
like this:
117.218.XXX.XXX
With that in place that tells the router to route all traffic from 117.218.XXX.XXX
on port 80
to 192.168.1.11
on port 80
.
That said, if the router itself uses port 80
for the D-Link management page, then you need to see if you can change the port that management page uses. Otherwise all you are doing with that ruleset is exposing your D-Link management page to anyone/anything that can reach that 117.218.XXX.XXX
. As to how to do that? Each router has different ways to handle that and some routers just don’t provide end users with that option since ISP’s generally don’t want end-users to easily run web servers off of their ISP-provided Internet connection.
D-Link 관리 페이지 포트를 포트가 아닌 다른 것으로 변경할 수없는 경우 80
차선책은 웹 서버의 포트를 8000
또는 같은 다른 것으로 변경하는 것입니다 8080
. 물론 이제 새 포트와 일치하도록 포트 전달 규칙을 조정해야하지만이 문제에 대한 최상의 / 간단한 솔루션 일 수 있습니다.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다