LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Routing traffic to VPN connection (https://www.linuxquestions.org/questions/linux-networking-3/routing-traffic-to-vpn-connection-123826/)

nadams 12-08-2003 08:17 AM

Routing traffic to VPN connection
 
I need help configuring the iptables and routing for a VPN machine.

The VPN has been set up with two nics both with ip addresses on the local network. The firewalls (a D-Link box and a LinkSys Box) have enabled a DMZ pointing to one of the nics.

I'm using debian 3.01 with kernel 2.4.19.

The VPN machine connects to the VPN alright but i want to use it as the gateway for the other machines on the network (all windows) so that they connect to the other network (192.168.2.*) through the VPN connection on the linux box. We can set the windows to have two gateways to enable them to access the internet in general without going through the linux box.


This code sets up the bridge.

#!/bin/sh

#Create the Interface (br0)
brctl addbr br0

#Add the interface cards to the bridge
brctl addif br0 eth0
brctl addif br0 eth1

#Start the ethernet devices
ifconfig eth0 0.0.0.0
ifconfig eth1 0.0.0.0

#Setup the bridge
ifconfig br0 192.168.1.199 netmask 0.0.0.0

#Setup the local card
ip addr add 192.168.1.200/24 dev br0

#Add a default route
route add default gw 192.168.1.1



Any help would be appreciated

scheidel21 12-08-2003 07:09 PM

ok which kind of VPN are you using? pptp, IPSEC, or another, that will be helpful to those trying to assist you. secondly if your experience ends up being at all like mine you'll pull your hair out. a quick aside when I was getting a pptp vpn up it took me weeks to get a config correct for users to logon, then once that was set I was working on the routing to other machines, then all of a sudden, I can no longer logon through my internet connection from machines outside my modem, I have since moved and have anew modem and service yet am still unable to logon from outside my in-house network. But back to you. If it's a pptp connection there's some killer stuff at this place.

http://pptpclient.sourceforge.net/routing.phtml

http://bmrc.berkeley.edu/people/chaffee/linux_pptp.html

well god luck and if you can tell me what went wrong with my vpn I'll, well, I'll thankyou. Pleasant VPNing

--Alex

nadams 12-09-2003 02:24 AM

Using PPTP with MPPE,

I've still got to worry about setting up the server aspect yet. so i'm a bit behind you anyway.

Thanks for the links

:study:

scheidel21 12-09-2003 04:34 AM

let us know how it going and post if you hae more probs
--alex

nadams 12-09-2003 09:19 AM

:D

Thanks for the help, I got it sorted. The link to
http://pptpclient.sourceforge.net/routing.phtml
was really helpful.

Thanks again, goodluck with your problems, I better get started working on that server.


All times are GMT -5. The time now is 03:52 PM.