I have a linux machine running Ubuntu 10.04 that is connected to a VPN via PPTP. When I browse the web the ip changes, when I use other apps I think its connecting to the VPN. But for some reason I just tried to connect to it from a windows machine on my network an I was able to browse the shares just fine (With samba). Is this normal? I thought that all access to the internet went through the vpn and no traffic would reach that machine from my local network. Am I mistaken? Whats going on here?
The IP protocol configuration may (and will) include multiple routes on your machine. Typical configuration of one machine directly connected to Internet with one adapter include two routes:
First route defines that all IP's on your LAN must be accessed directly with an adapter
When you connect to VPN, second route gets replaced with something like
which means that all packets non-matched by narrower routes should go thru the PPP interface.
Your Windows machine is still on your LAN, and can be freely accessed by your Linux host.
I'm not sure that the IP actually changes. Most OSs can assign a network card more than a single IP address. So even though some traffic goes through the VPN tunnel, the normal IP address of the machine is still active which means all services are available.
If you want to prevent this, you can try to change your firewall settings.