Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a pptp VPN login, it is possible to set this VPN connection to only one port? For example I want to redirect my VPN connection to FTP's port 21. Then access FTP from outside from the VPN adress.

Another question:

It is possible to on router which have VPN client function, forward a single port with VPN connection, and on PC2 (which is outside the network and not using VPN) redirect FTP'21 port to that router's open port and this PC would get the router's IP adress.

ROUTER (vpn client-> forward port 21?) -> PC2 (outside the network) (connect to ROUTER's 21 port from the internet)-> PC2 IP=ROUTER VPN IP

share|improve this question
add comment

3 Answers

This is not something pptp would be doing, its something you would do with IPTables.

share|improve this answer
add comment

PPTP does not only use a TCP Port (1743 ?), but also an 'Internet Protocol' - IP 43 == GRE (like TCP or UDP are Internet Protocols). I know of no standard tools (OS level or router based) that allow you to redirect those.

I suppose, you are looking for ways to get around a restrictive firewall... maybe you should talk to the admin of that firewall first.

I you still want to set up a VPN that is easy to tunnel, SSL based tools like OpenVPN might be the easier way.

share|improve this answer
    
I believe you mean IP 47 == GRE –  Basic Feb 24 '12 at 9:58
add comment

Hey :D, you should just run the daemon on port 21 and you don't have to do redirects. :D That's better. And then for VPN clients (another sub LAN) you should make an iptable rule like

iptables -t nat -A PREROUTING -s vpnsublan -p tcp -d vpninterface --dport vpnftp21 -j DNAT --to ipdaddr:port

Or, you can run PPTPD daemon in external interface port 21 and FTP daemon on an internal interface. That should be better. :D

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.