Community discussions

 
ronylove
just joined
Topic Author
Posts: 15
Joined: Fri Aug 10, 2018 6:33 pm

Redirecting Problems

Sat Jul 13, 2019 2:17 am

Dear, good afternoon.
I would like to ask for your cooperation in this problem that I have.
I have a RB configured with internet access
- Segment 192.168.0.1/24 (IP of the Router)
- LAN

* PC2 = 192.168.0.3 user with fixed IP
* PC3 = 192.168.0.4 local web server

What I want is that people who try to enter my RB and digitize the IP (192.168.0.1), this automatically sends them to the IP of the local Web server (192.168.0.4)
The rule you use is:
- Firewall ==> NAT ==>
chain = dstnat Dst. Address = 192.168.0.1 protocol = tcp Dst.Port = 80 action = dst-nat To Addresses = 192.168.0.4 To Ports = 80

But when I do the test, the page goes blank and does not load anything.
 
2frogs
Long time Member
Long time Member
Posts: 540
Joined: Fri Dec 03, 2010 1:38 am

Re: Redirecting Problems

Sat Jul 13, 2019 4:28 am

You also need a src-nat:
/ip firewall nat
add action=src-nat chain=srcnat src-address=192.168.0.0/24 dst-address=192.168.0.4 to-address=192.168.0.1
 
ronylove
just joined
Topic Author
Posts: 15
Joined: Fri Aug 10, 2018 6:33 pm

Re: Redirecting Problems

Tue Jul 16, 2019 12:51 am

thanks for answering "2frogs".
I would like to see if I understood. Apart from the rule I put above, I need to place the srcnat rule.

Thank you.
 
2frogs
Long time Member
Long time Member
Posts: 540
Joined: Fri Dec 03, 2010 1:38 am

Re: Redirecting Problems  [SOLVED]

Tue Jul 16, 2019 3:33 am

That is correct, you need both rules.

Who is online

Users browsing this forum: MSN [Bot] and 59 guests