Koozali.org: home of the SME Server

Wireless Security

Duncan

Wireless Security
« on: May 25, 2002, 02:05:02 PM »
A couple of people where interested in getting a VPN up and running on a third nic.
http://forums.contribs.org/index.php?topic=13765.msg52395#msg52395

If you still have a need for this, post a reply. I have managed to get this up and running using a couple of wireless cards.

Regards Duncan

Dean Mumby

Re: Wireless Security
« Reply #1 on: May 25, 2002, 03:14:38 PM »
I would be interested simply because I have a dlink dwl-520 pci card and need to use it as my external NIC any advice would be greatly appreciated.

Regards
Dean

Graeme Fleming

Re: Wireless Security
« Reply #2 on: May 25, 2002, 03:25:50 PM »
Look forward to an interesting read.

Ta muchly

Duncan

Re: Wireless Security
« Reply #3 on: May 25, 2002, 06:57:15 PM »
Ok, It goes something like this.

E-smith 5.1.2 in server-gateway mode
Client - Win2000 machine

eth0 - internal lan 10.0.0.5
eth1 - external 10.0.2.5 (adsl-router etc)
wlan0 - 10.0.1.15 (Zoomair pcmcia wireless card)
subnet mask - 255.255.255.224

pptpd uses ports 47 and 1723, so in /etc/rc.d/init.d/masq you would look for the following lines

/sbin/ipchains --append input -p tcp -s 0/0 -d $OUTERNET 1723 -j ACCEPT
/sbin/ipchains --append input -p 47 -s 0/0 -d $OUTERNET -j ACCEPT

# Accept incoming GRE packets
/sbin/ipchains --append input -p 47 -s 0/0 -d $OUTERNET -j ACCEPT

and add the following so it looks like this

/sbin/ipchains --append input -p tcp -s 0/0 -d $OUTERNET 1723 -j ACCEPT
/sbin/ipchains --append input -p tcp -s 0/0 -d 10.0.1.15 1723 -j ACCEPT
/sbin/ipchains --append input -p 47 -s 0/0 -d $OUTERNET -j ACCEPT
/sbin/ipchains --append input -p 47 -s 0/0 -d 10.0.1.15 -j ACCEPT


# Accept incoming GRE packets
/sbin/ipchains --append input -p 47 -s 0/0 -d $OUTERNET -j ACCEPT
/sbin/ipchains --append input -p 47 -s 0/0 -d 10.0.1.15 -j ACCEPT

Then restart masq /etc/rc.d/init.d/masq restart. What i have done is opened the ports on the wireless card to allow pptp connections. (you need to find some way to make this stick ie edit the templates)

Set your machine up to accept pptp connections in the server manager.

I am using a Windows 2000 client machine to connect to the e-smith box. Set your Vpn client to connect to the external ip address of your machine (it will route through and connect fine), in my case 10.0.2.5 (this is the one that it listens on) and you should be able to connect. If you don’t want to open the vpn to the internet you can change the listening port in /etc/pptpd.conf (again, you need to find a way to make this stick)

I have WEP enabled for whatever added security that provides. The above is only suitable for a server-gateway setup as a server only setup does not run a firewall.
I plan on getting another machine up and running with the above method in server only mode and playing with masq to secure the client end. This would allow LAN-to-LAN connections rather than client to LAN connections. Also, bare in mind that the Win2000 machine is the weak link here. Hack that and you have open access to the e-smith box (pretty paranoid though). Running a port scan from the Windows machine shows port 80 and 3128 open which would need to be closed.

Whatever you do, don’t use the local networks function in the server manager (except for testing) as this opens the machine right up. You could i guess use an additional Ethernet card and substitute the wireless card for an AP. Shouldn’t be a problem.

All of this is really untested (got it working today) and could be done more elegantly, but it seems to work pretty well.

Anyway it’s late, I’m tired. If you have any questions or suggestions (criticisms) let me know.

Regards Duncan.

Duncan

Re: Wireless Security
« Reply #4 on: May 26, 2002, 03:51:02 PM »
So after a bit more testing, i realised that changes to masq are not required. E-Smith pptpd will accept connections from anywhere on its external interface address. This means that so long as you can either get an internal wireless card working or set up an AP on an additional nic, it should be fairly easy to get wireless Vpn connections up and running.

I tested the system in private gateway and server mode, and it closed the system right up on the wireless connection (only allowing pptpd connections).

So anyway, a-lot of my previous post can be ignored.

Regards Duncan

asotelo

Re: Wireless Security
« Reply #5 on: May 24, 2003, 12:09:11 AM »
I'm trying to this in SME 5.6u4. Is this configuration still valid?