Community discussions

MikroTik App
 
sziaee
just joined
Topic Author
Posts: 6
Joined: Thu Jun 26, 2014 11:19 pm

nat to ip from pppoe-out

Wed Sep 08, 2021 2:50 pm

i have a microtick attached to a internet line in ether1 and all users in network use that as their gateway.
every setting was established by mikrotik default script

now i want to use the second internet access at ether10 with valid ip address and use that address for connection to my internal server

the connection was successful and now i can see the microtik router from the outside with ip

i used this nat :
/ip firewall nat add chain=dstnat action=dst-nat dst-address=85.133.86.8 dst-port=22 to-addresses=172.22.66.10 protocol=tcp

but is not working
and i dont know why
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: nat to ip from pppoe-out

Wed Sep 08, 2021 2:52 pm

because that server still go out from 1st wan and the remote device do not see the reply because coming from another IP
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 18958
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: nat to ip from pppoe-out

Wed Sep 08, 2021 6:29 pm

In short, the problem is elsewhere.
/export hide-sensitive file=anynameyouwish.

My guess is that IP routes are the issue, and is what I think rextended was alluding to.
 
User avatar
iaskakho
just joined
Posts: 17
Joined: Sun Sep 05, 2021 9:27 pm
Location: New York, USA
Contact:

Re: nat to ip from pppoe-out

Wed Sep 08, 2021 7:00 pm

I specify the global ip as the src-address not the dst-address and also the port on the to- and interface from which it is coming from:
chain=dstnat action=dst-nat to-addresses=10.0.2.2 to-ports=3306 protocol=tcp src-address=<global-ip> in-interface-list=INET dst-port=3306 log=no log-prefix=""
You can also enable log and then watch the log /log print follow-only.

Another thing I would do is use the sniffer to see where the packets are going:
/tool sniffer quick ip-address=10.0.2.2

Who is online

Users browsing this forum: Bing [Bot], unhuzpt and 25 guests