On my home pc, i have 2 ubuntus running on Vmware workstation both using bridged connection.
On one, i have OpenVpn Access Server running which works great.
I am able to go to my dyndns domain from school and get the client and get connected to my home pc.
The other ubuntu has the community version of openvpn installed and i am trying to get the same results.
I have mysql-server and pam_mysql for authentication. <- did not add it on the newly created VM
I believe my configuration is wrong and needs correcting.
I made sure that the ports were forwarded on my home router
So, i restarted with a new VM and reconfigured everything.
Once connection was established from the school PC, i was able to surf the net.
But i noticed sites were still blocked (not the case when i was using AS).
I did an ipconfig, there was no default gateway assigned to the Windows TAP adapter.
I tried adding push "redirect-gateway def1" to the server config.
After doing that, i was not able to surf the net at all.
New Server Config
Code: Select all
local 192.168.0.192
port 443
proto tcp
dev tap0
up "/etc/openvpn/up.sh br0"
down "/etc/openvpn/down.sh br0"
ca ca.crt
cert server.crt
key server.key # This file should be kept secret
dh dh1024.pem
server-bridge 10.10.10.1 255.255.255.0 10.10.10.10 10.10.10.10.10.14
client-to-client
keepalive 10 120
tls-auth ta.key 0
comp-lzo
max-clients 5
user nobody
group nogroup
persist-key
persist-tun
status status/server1.log
log-append /var/log/openvpn/server1.log
verb 5
Code: Select all
pull
client
dev tap
proto tcp
port 443
remote *.dyndns-ip.com
key client1.key
cert client1.crt
ca ca.crt
tls-auth ta.key 1
resolv-retry infinite
nobind
comp-lzo
verb 5
Code: Select all
#!/bin/sh
#This is /etc/openvpn/up.sh
BR=$1
DEV=$2
MTU=$3
/sbin/ifconfig $DEV mtu $MTU promisc up
/usr/sbin/brctl addif $BR $DEV
Code: Select all
#!/bin/sh
#This is/etc/openvpn/down.sh
BR=$1
DEV=$2
/usr/sbin/brctl delif $BR $DEV
/sbin/ifconfig $DEV down
http://pastebin.com/q5fsYad6
/Etc/network/interfaces
Code: Select all
auto lo
iface lo inet loopback
auto br0
iface br0 inet static
address 192.168.0.192
network 192.168.0.0
netmask 255.255.255.0
broadcast 192.168.0.255
gateway 192.168.0.1
bridge_ports eth0
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off
Code: Select all
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 br0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 br0
0.0.0.0 192.168.0.1 0.0.0.0 UG 100 0 0 br0
root@ubuntu:~# iptables -L -n -v
Chain INPUT (policy ACCEPT 1671 packets, 198K bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- tap0 * 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT all -- tap0 * 0.0.0.0/0 0.0.0.0/0
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
352 58603 ACCEPT all -- br0 * 0.0.0.0/0 0.0.0.0/0
Chain OUTPUT (policy ACCEPT 1651 packets, 277K bytes)
pkts bytes target prot opt in out source destination