Community discussions

MikroTik App
 
200120022003
newbie
Topic Author
Posts: 25
Joined: Sat Jul 25, 2009 6:52 pm

PPTP server listen on some IP & NAT to some IP ?

Fri Nov 27, 2009 10:19 am

I want to:

1. PPTP server Listen on 10 IPs.
2. Create some specify IP pool correspond to that 10 IPs.
3. When a user dial-up to x.x.x.1 then SNAT to x.x.x.1, if x.x.x.2 then SNAT to x.x.x.2

Can RouterOS do that ? How can I do ? Thank you for your help !
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: PPTP server listen on some IP & NAT to some IP ?

Fri Nov 27, 2009 7:34 pm

Create 10 address-lists that cover the 10 pools attached to the 10 PPTP server instances, then src-nat accordingly. Below an example with 2 PPTP servers, simply expand it:

PPTP server IP 1.1.1.2 serves the client IP pool 10.0.0.0/24
PPTP server IP 1.1.1.3 serves the client IP pool 10.0.1.0/24
/ip address-list
add list=pptp_server_1 address=10.0.0.0/24
add list=pptp_server_2 address=10.0.1.0/24

/ip firewall nat
add chain=srcnat out-interface=[name WAN interface] src-address-list=pptp_server_1 action=src-nat to-addresses=1.1.1.2
add chain=srcnat out-interface=[name WAN interface] src-address-list=pptp_server_2 action=src-nat to-addresses=1.1.1.3
You could do that without the address-lists and just specify 'src-address=10.0.0.0/24' and 'src-address=10.0.1.0/24' respectively, but if you ever attach more than one pool to a PPTP server it's easier to use address-lists, and it doesn't hurt to do it from the start.
 
200120022003
newbie
Topic Author
Posts: 25
Joined: Sat Jul 25, 2009 6:52 pm

Re: PPTP server listen on some IP & NAT to some IP ?

Sat Nov 28, 2009 4:39 am

I add the public IP (10 IPs) to WAN interface.
I can dialup to the first IP, but can't dialup to 2-10 IPs.
How can I listen on all IP or specify IP ?

After that, how can ip firewall know which IP is the VPN user dial to ?

Thank you.
 
200120022003
newbie
Topic Author
Posts: 25
Joined: Sat Jul 25, 2009 6:52 pm

Re: PPTP server listen on some IP & NAT to some IP ?

Sun Nov 29, 2009 6:52 am

Can anyone help me ?