Host Suse 11.1 Guest XP Contivity SecurID
Posted: 6. Apr 2009, 22:31
I need to configure the Nortel Contivity VPN Client to connect from an XP Guest through a secure tunnel in a Suse 11.1 Host.
The goal of this post is to write a simple bash script that will do the job for everybody.
There are several other threads on this topic but they are still not simple enough for me to make it work.
This is what I have built so far (credit to other posters in this forum - thanks)
However - it still doesn't work and there are lots of things I don't understand.
Please review, correct, enhance in anyway possible.
The plan is to run this script (from root?) on the host before starting up VB.
Thanks to everyone who can help -
The goal of this post is to write a simple bash script that will do the job for everybody.
There are several other threads on this topic but they are still not simple enough for me to make it work.
This is what I have built so far (credit to other posters in this forum - thanks)
However - it still doesn't work and there are lots of things I don't understand.
Please review, correct, enhance in anyway possible.
The plan is to run this script (from root?) on the host before starting up VB.
Thanks to everyone who can help -
Code: Select all
#!/bin/bash
# Delete the old bridge
#-----------------------
OLDBRIDGE=$(brctl show | wc -l)
if (( $OLDBRIDGE > 1 )); then
echo "Bridge already created"
ifconfig br0 down
echo "Bridge is down"
brctl delbr br0
if (( ! $? )); then
echo "Deleted bridge br0"
else
echo "bridge br0 NOT deleted"
fi
fi
ifconfig eth1 down
ifconfig eth1 0.0.0.0 netmask 0.0.0.0 promisc # Is promiscuity important ?
ifconfig eth1 hw ether 00:00:00:00:00:00
# Build a tunnel and configure it
#---------------------------------
openvpn --rmtun --dev tap0 2>&1 > /dev/null
openvpn --mktun --dev tap0
ifconfig tap0 down
ifconfig tap0 0.0.0.0 netmask 0.0.0.0
ifconfig tap0 hw ether 00:11:09:de:08:2a # what is this address and how do I know it is right ?
chown root:vboxusers /dev/net/tun
chmod g+rw /dev/net/tun
# Build a bridge and configure it
#---------------------------------
brctl addbr br0
ifconfig br0 192.168.1.1 netmask 255.255.255.0
ifconfig br0 hw ether 00:11:09:de:08:2a
ifconfig br0 broadcast 192.168.1.255
brctl addif br0 eth1
brctl addif br0 tap0
route add -net 0.0.0.0 gw 192.168.1.254 # this is the address of my modem
# Now set up the Linux firewall to permit packets to flow freely
# over the newly created tap0 and br0 interfaces:
#--------------------------------------------------
iptables -A INPUT -i tap0 -j ACCEPT
iptables -A INPUT -i br0 -j ACCEPT
iptables -A FORWARD -i br0 -j ACCEPT
ifconfig eth1 up
ifconfig tap0 up
ifconfig br0 up
# End of File