but all traffic ceased to function - I don't think I am doing the iptables command correctly. How do I correctly forward the traffic from the VPN server to my home gateway?
Any help is greatly appreciated, I have tried several things that I cannot even keep track of and they have all lead to more frustration.
Home GW: 192.168.1.1
VPN Server local ip: 192.168.1.124
Home domain name (DDNS) : kcghost.com (not actually)
client.ovpn
Code: Select all
### Client configuration file for OpenVPN
# Specify that this is a client
client
# Bridge device setting
dev tap
# Host name and port for the server (default port is 1194)
# note: replace with the correct values your server set up
remote kcghost.com 1194
# Client does not need to bind to a specific local port
nobind
# Keep trying to resolve the host name of OpenVPN server.
## The windows GUI seems to dislike the following rule.
##You may need to comment it out.
resolv-retry infinite
# Preserve state across restarts
persist-key
persist-tun
# SSL/TLS parameters - files created previously
ca ca.crt
cert client.crt
key client.key
# Since we specified the tls-auth for server, we need it for the client
# note: 0 = server, 1 = client
tls-auth ta.key 1
# Specify same cipher as server
cipher BF-CBC
# Use compression
comp-lzo
# Log verbosity (to help if there are problems)
verb 3
Code: Select all
mode server
tls-server
local 192.168.1.124
port 1194
proto udp
dev tap0
up "/etc/openvpn/up.sh br0"
down "/etc/openvpn/down.sh br0"
persist-key
persist-tun
ca ca.crt
cert server.crt
key server.key
dh dh1024.pem
tls-auth ta.key 0
cipher BF-CBC
comp-lzo
ifconfig-pool-persist ipp.txt
server-bridge 192.168.1.124 255.255.255.0 192.168.1.170 192.168.1.175
push "dhcp-option DNS 192.168.1.1"
push "dhcp-option DOMAIN kcghost.com"
max-clients 5
user nobody
group nogroup
keepalive 10 120
status openvpn-status.log
verb 3
Code: Select all
#!/bin/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
BR=$1
DEV=$2
/usr/sbin/brctl delif $BR $DEV
/sbin/ifconfig $DEV down
Code: Select all
auto lo br0
iface lo inet loopback
iface br0 inet static
address 192.168.1.124
netmask 255.255.255.0
gateway 192.168.1.1
bridge_ports eth0
iface eth0 inet manual
up ifconfig $IFACE 0.0.0.0 up
up it link set $IFACE promisc on
down ip link set $IFACE promisc off
down ifconfig $IFACE down