Community discussions

MikroTik App
ranjan
newbie
Topic Author
Posts: 31
加入: 你e Nov 08, 2011 5:50 am

Port Forwarding and Web Access of an Internal LAN IP.

你e Nov 08, 2011 7:16 am

Dear All,
This is my first query on this forum.
I am using RB450 with winbox OS 5.6.
我想我的一个局域网的访问pc over web-access.
I want to do port forwarding.
My current configuration for Mikrotik is
Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK INTERFACE
0 ;;; WAN
XXX.XXX.XXX.XXX/24 XXX.XXX.XXX.XXX ether1
1 ;;; LAN
192.168.0.250/24 192.168.0.0 ether5

then I have gone through the document and wrote the code
Flags: X - disabled, I - invalid, D - dynamic
0 chain=dstnat action=redirect to-ports=2138 protocol=tcp in-interface=ether5 dst-port=80

1 chain=srcnat action=masquerade src-address=192.168.0.0/24

2 ;;; Server Remote Access
chain=dstnat action=dst-nat to-addresses=192.168.0.63 to-ports=80 protocol=tcp in-interface=ether1 dst-port=80
but still I am unable to access the PC (192.168.0.63) with port 80 through web access:(.
So please tell me how I should configure to get web access of a PC which is connected in my LAN.
Thanks in advance:).
Top
用户头像
sadeghrafie
Long time Member
Long time Member
Posts: 514
加入: Sat Nov 14, 2009 11:28 am
Location:Bushehr, IRAN

Re: Port Forwarding and Web Access of an Internal LAN IP.

你e Nov 08, 2011 7:31 am

Your NAT code is wrong, because you didn't specify dst-address.
Code:Select all
chain=dstnat action=dst-nat to-addresses=192.168.0.63 to-ports=80 protocol=tcp dst-address=x.x.x.x dst-port=80
just another thing, from where you want to access to port 80 on PC? if from the same LAN, it is not depend on mikroitk.
Top
ranjan
newbie
Topic Author
Posts: 31
加入: 你e Nov 08, 2011 5:50 am

Re: Port Forwarding and Web Access of an Internal LAN IP.

你e Nov 08, 2011 9:38 am

Thanks for ur help but still I am unable to get that PC through web access.
Can u please tell me that "do I need to put the static ip provided by our ISP which was used in WAN port of Mikrotik router"?

Or if u can just show me step by step configuration pics which can be possible through WinBox?

Thanks in advance.
Top
用户头像
sadeghrafie
Long time Member
Long time Member
Posts: 514
加入: Sat Nov 14, 2009 11:28 am
Location:Bushehr, IRAN

Re: Port Forwarding and Web Access of an Internal LAN IP.

星期二11月08年2011 50点

If your ISP assign you static IP and you want to access the web server through this, you need to put your static IP instead of x.x.x.x in the above code, just this. you must be sure that the PC (192.168.0.3) will accept packets to port 80
Top
ranjan
newbie
Topic Author
Posts: 31
加入: 你e Nov 08, 2011 5:50 am

Re: Port Forwarding and Web Access of an Internal LAN IP.

你e Nov 08, 2011 10:06 am

If your ISP assign you static IP and you want to access the web server through this, you need to put your static IP instead of x.x.x.x in the above code, just this. you must be sure that the PC (192.168.0.3) will accept packets to port 80
can you please tell me step by step configuration for accessing a LAN PC through web?
I want to do it. I will remove the earlier configuration code.

Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK INTERFACE
0 ;;; WAN
122.170.14.211/24 122.170.14.211 ether1
1 ;;; LAN
192.168.0.250/24 192.168.0.0 ether5

Now can you please help me with the code?
Thanks in advance.
Top
用户头像
sadeghrafie
Long time Member
Long time Member
Posts: 514
加入: Sat Nov 14, 2009 11:28 am
Location:Bushehr, IRAN

Re: Port Forwarding and Web Access of an Internal LAN IP.

你e Nov 08, 2011 10:15 am

what do you want to do? do you have anyweb server(because you mentioned to port 80) on your PC? or want to access throughremote desktop?
tell me what do you want to do exactly then I can help you with step by step configuration.
Top
ranjan
newbie
Topic Author
Posts: 31
加入: 你e Nov 08, 2011 5:50 am

Re: Port Forwarding and Web Access of an Internal LAN IP.

你e Nov 08, 2011 12:46 pm

what do you want to do? do you have anyweb server(because you mentioned to port 80) on your PC? or want to access throughremote desktop?
tell me what do you want to do exactly then I can help you with step by step configuration.
I want to access pc through remote desktop.
Top
用户头像
sadeghrafie
Long time Member
Long time Member
Posts: 514
加入: Sat Nov 14, 2009 11:28 am
Location:Bushehr, IRAN

Re: Port Forwarding and Web Access of an Internal LAN IP.

你e Nov 08, 2011 12:51 pm

So, you need to use port 3389 which related to remote desktop for Microsoft windows.
Code:Select all
chain=dstnat action=dst-nat to-addresses=192.168.0.63 to-ports=3389 protocol=tcp dst-address=x.x.x.x dst-port=3389
Top
ranjan
newbie
Topic Author
Posts: 31
加入: 你e Nov 08, 2011 5:50 am

Re: Port Forwarding and Web Access of an Internal LAN IP.

你e Nov 08, 2011 1:39 pm

So, you need to use port 3389 which related to remote desktop for Microsoft windows.
Code:Select all
chain=dstnat action=dst-nat to-addresses=192.168.0.63 to-ports=3389 protocol=tcp dst-address=x.x.x.x dst-port=3389
What will be the figure there in place of x.x.x.x?
also can u please tell me that if the port mentioned is 80 then will it work as remote access or not?
Top
用户头像
sadeghrafie
Long time Member
Long time Member
Posts: 514
加入: Sat Nov 14, 2009 11:28 am
Location:Bushehr, IRAN

Re: Port Forwarding and Web Access of an Internal LAN IP.

你e Nov 08, 2011 2:55 pm

x.x.x.x should be the public IP of your router which you want to access it.
0 ;;; WAN
122.170.14.211/24 122.170.14.211 ether1
>> 122.170.14.211

Can you tell me what do you mean by "remote access" ?

Port 80 is a registered port for HTTP and you can use it if you have a web server on your PC.
When you are planning to access to your PC through remote desktop(In Microsoft windows), the windows remote desktop terminal use port 3389.

I hope this can solve your problem.
Top
ranjan
newbie
Topic Author
Posts: 31
加入: 你e Nov 08, 2011 5:50 am

Re: Port Forwarding and Web Access of an Internal LAN IP.

Wed Nov 09, 2011 6:40 am

x.x.x.x should be the public IP of your router which you want to access it.
0 ;;; WAN
122.170.14.211/24 122.170.14.211 ether1
>> 122.170.14.211

Can you tell me what do you mean by "remote access" ?

Port 80 is a registered port for HTTP and you can use it if you have a web server on your PC.
When you are planning to access to your PC through remote desktop(In Microsoft windows), the windows remote desktop terminal use port 3389.

I hope this can solve your problem.
I am actually willing to access/view all my reports which are there on my server through http address.
Right now I used to do it for local network only (http://hopesrv4/Reports/Pages/Folder.aspx).
The report generating software is maintained by some other agency and they asked me to do the port forwarding for port no 80.
And I want to do port forwarding so that this webaddress (http://hopesrv4/Reports/Pages/Folder.aspx) can also be accessed from anywhere in the world.
So can you please tell me that with the NAT rule I was asking will suffice my need?
If possible can you give me your any of messenger id (gmail, hotmail, yahoo) so that I can chat you live?
Waiting for reply.
Thanks in advance.
Top

Who is online

Users browsing this forum:Semrush [Bot]and 19 guests