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.

Details:

eth0 = current internet port

pptp1 = VPN connection, when I connect to my provider, the provider gives me an IP address, which is accessible from the internet. I would like to connect through this IP back to my PC.

I want to keep my primary internet connection (eth0) on my PC for all traffic, but route traffic through the VPN for a specified application/or port, to access application/port from the IP, which I given from the pptp provider. Huhh? Difficult but, it is possible? If yes, how?

The incoming port will be always: 33340 Outgoing port can be change, but usually it is 33330

share|improve this question
    
This a Linux desktop and it's acting as your Internet gateway? more details. –  gravyface Nov 24 '11 at 18:09

2 Answers 2

You should read Linux Advanced Routing and Traffic Control HOWTO.

In short: there are several routing tables. route utility manages only one of them - main, to view/modify other tables you should use ip. If you want to use different routes for some traffic, you should create custom table, define ruotes in it and create rules to pass your traffic though that table. Rules may use mark, set to some packets by iptables target MARK.

share|improve this answer

I've used this guide to setup specific routes before. It should be a light read/process.

http://www.ubuntugeek.com/howto-configure-pptp-vpn-in-ubuntu-intrepid-and-jaunty.html

share|improve this answer
    
Please consider avoiding just linking to other sites, instead providing specific details in your answer. It's no use someone coming back to this site a year from now to find that your link has 404'd (or similar). –  growse Nov 3 '12 at 0:29

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.