Community discussions

MikroTik App
 
ibm
Member
Member
Topic Author
Posts: 306
Joined: Mon May 12, 2014 5:16 pm

Change PPTP client and server port

Tue Apr 14, 2015 4:03 pm

Is it possible to specify another tcp port instead of 1723 in PPTP client and server?
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4047
Joined: Wed May 11, 2011 6:08 pm

Re: Change PPTP client and server port

Tue Apr 14, 2015 8:07 pm

You could use src/dst nat rules to manipulate the packet headers.
 
ibm
Member
Member
Topic Author
Posts: 306
Joined: Mon May 12, 2014 5:16 pm

Re: Change PPTP client and server port

Tue Apr 14, 2015 8:57 pm

I tried the following but they don't work
server side:
add action=redirect chain=dstnat disabled=yes dst-port=1723 in-interface="ether1 - WAN" protocol=tcp to-ports=5000

client side:
add action=src-nat chain=srcnat disabled=yes dst-address=5.5.5.5 dst-port=1723 protocol=tcp to-addresses=5.5.5.5 to-ports=5000
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4047
Joined: Wed May 11, 2011 6:08 pm

Re: Change PPTP client and server port

Tue Apr 14, 2015 9:57 pm

I tried the following but they don't work
server side:
add action=redirect chain=dstnat disabled=yes dst-port=1723 in-interface="ether1 - WAN" protocol=tcp to-ports=5000

client side:
add action=src-nat chain=srcnat disabled=yes dst-address=5.5.5.5 dst-port=1723 protocol=tcp to-addresses=5.5.5.5 to-ports=5000
On the server side, you have to map 5000 back to 1723, so reverse those.
 
ibm
Member
Member
Topic Author
Posts: 306
Joined: Mon May 12, 2014 5:16 pm

Re: Change PPTP client and server port

Tue Apr 14, 2015 10:31 pm

Yes, I made a mistake when rewriting rules but I applied that yours with no success.
As you can see in the image the server doesn't receive nothing on 5000.

Image
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4047
Joined: Wed May 11, 2011 6:08 pm

Re: Change PPTP client and server port

Tue Apr 14, 2015 10:50 pm

Is the in-interface correct?
Also - is the to-address correct? (it's blacked out, so I have to ask)
 
ibm
Member
Member
Topic Author
Posts: 306
Joined: Mon May 12, 2014 5:16 pm

Re: Change PPTP client and server port

Tue Apr 14, 2015 10:57 pm

Is the in-interface correct?
Also - is the to-address correct? (it's blacked out, so I have to ask)
Yes, it's correct, I also tried to not specificate the in-interface.
The 2 address are the same so the port is correctly changed but on the server no packets arrive.
If I use a browser to test ipofserver:5000 I see the packets so I thing that the problem is the source nat.
On the client the interface with source nat has also a masquerading rule but is on the bottom.
 
dangucci
just joined
Posts: 18
Joined: Sun Aug 31, 2014 10:30 pm

Re: Change PPTP client and server port

Thu Jul 12, 2018 9:10 am

any solution for this? server side is ok using redirect nat rule but client side port has to be changed using firewall rules. Works fine with linux .. someone please help