Community discussions

MikroTik App

what's your best vpn tunneling protocol?

Poll ended at Sat May 07, 2011 11:13 am

PPTP
1 (25%)
L2TP
No votes
IPSec
2 (50%)
GRE
No votes
openVPN
1 (25%)
N2N
No votes
Other
No votes
 
Total votes: 4
 
voipworld
just joined
Topic Author
Posts: 21
Joined: Thu Apr 07, 2011 6:44 am

nat subnet through pptp

Fri Apr 22, 2011 11:13 am

hi friends,
now i have my RB750G connected to my remote cisco router through pptp
cisco can ping mt, mt can ping cisco.
now what i need is to nat my subnet through the pptp outgoing interface
but not all the time, is a conditional nat
for example, if i want to access this subnet:
80.249.74.0/24 should goes through pptp, but nated
here's my interfaces:
[admin@MikroTik] /interface> print
Flags: D - dynamic, X - disabled, R - running, S - slave
# NAME TYPE MTU L2MTU
0 R ether1-gateway ether 1500 1524
1 R ether2-local-master ether 1500 1524
2 ether3-local-slave ether 1500 1524
3 ether4-local-slave ether 1500 1524
4 ether5-local-slave ether 1500 1524
5 R anis pppoe-out 1480
6 R cisco pptp-out 1460
[admin@MikroTik] /interface>
routes:
[admin@MikroTik] /ip route> print
Flags: X - disabled, A - active, D - dynamic,
C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme,
B - blackhole, U - unreachable, P - prohibit
# DST-ADDRESS PREF-SRC GATEWAY DISTANCE
0 ADS 0.0.0.0/0 41.200.8.1 1
1 ADC 41.200.8.1/32 41.200.8.8 anis 0
2 ADC 172.23.0.1/32 41.221.20.11 cisco 0
3 ADC 172.29.0.0/29 172.29.0.1 ether2-local-ma... 0
[admin@MikroTik] /ip route>

nat:
[admin@MikroTik] /ip firewall nat> print
Flags: X - disabled, I - invalid, D - dynamic
0 chain=srcnat action=masquerade out-interface=anis
[admin@MikroTik] /ip firewall nat>
filters:
[admin@MikroTik] /ip firewall filter> print
Flags: X - disabled, I - invalid, D - dynamic
0 ;;; default configuration
chain=input action=accept protocol=icmp
[admin@MikroTik] /ip firewall filter>
address:
0 172.29.0.1/29 172.29.0.0 ether2-local-master
1 D 41.200.8.8/32 41.200.8.1 anis
2 D 41.221.20.11/32 172.23.0.1 cisco
[admin@MikroTik] /ip address>
41.200.8.X is my DSL connection while 41.221.20.11 is my pptp link.
please if someone can help i would by happy.
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7198
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: nat subnet through pptp

Tue Apr 26, 2011 11:43 am

You need to reroute specific traffic over pptp, for example
/ip route add dst-address=80.249.74.0/24 gateway=cisco
 
voipworld
just joined
Topic Author
Posts: 21
Joined: Thu Apr 07, 2011 6:44 am

Re: nat subnet through pptp

Sat Jul 09, 2011 3:22 pm

that worked perfectly using dstnat chain :P
thank you for your reply.
You need to reroute specific traffic over pptp, for example
/ip route add dst-address=80.249.74.0/24 gateway=cisco