A little background:
- I am a novice when it comes to linux and routers/networking, I only understand some of the basics.
- My main router that is connected to the internet is 192.168.1.1, my vpn router is 192.168.1.3
- I disabled the DHCP server on my vpn router so that my computers on my main router could communicate with the computers behind my vpn router.
- My goal is to be able to plug in a computer to my VPN router and have all the traffic be routed to the VPN, and still be able to communicate with those computers behind that router with the rest of my computers behind main router. If I am unable to communicate with the computers behind the VPN router I am fine with that so long as all traffic is forwarded to the VPN.
My Config:
Code: Select all
Setup:
WAN Connection Type: Disabled
STP: Disabled
Local IP Address: 192.168.1.3
Subnet Mask: 255.255.255.0
Gateway: 192.168.1.1
Local DNS: 192.168.1.1
Assign WAN Port to Switch: yes
DHCP disabled
DNSMasq DHCP/DNS Disabled
Advanced Routing:
Operating Mode: Router
Interface: LAN & WLAN
Services:
OpenVPN Client: Enabled, default settings
Security:
SPI Firewall: Disabled
Code: Select all
sleep 5
echo "
client
dev tun
proto udp
remote ******.com 1194
redirect-gateway def1
resolv-retry infinite
server-poll-timeout 10
script-security 2
nobind
persist-key
persist-tun
comp-lzo
verb 5
mute 5
ns-cert-type server
ca /tmp/openvpncl/ca.crt
cert /tmp/openvpncl/server.crt
key /tmp/openvpncl/server.key
tls-auth /tmp/openvpncl/tls.key 1
" > /tmp/openvpncl/myopenvpn.conf
sleep 1
echo "
-----BEGIN CERTIFICATE-----
*********************************
-----END CERTIFICATE-----
" > /tmp/openvpncl/ca.crt
sleep 1
echo "
-----BEGIN CERTIFICATE-----
*********************************
-----END CERTIFICATE-----
" > /tmp/openvpncl/server.crt
sleep 1
echo "
-----BEGIN RSA PRIVATE KEY-----
*********************************
-----END RSA PRIVATE KEY-----
" > /tmp/openvpncl/server.key
sleep 1
echo "
-----BEGIN OpenVPN Static key V1-----
*********************************
-----END OpenVPN Static key V1-----
" > /tmp/openvpncl/tls.key
sleep 5
killall openvpn
/usr/sbin/openvpn --config /tmp/openvpncl/myopenvpn.conf --route-up /tmp/openvpncl/route-up.sh --down /tmp/openvpncl/router-down.sh --daemon &
Once I start openvpn everything starts fine, so I run the following commands on my router via ssh
Code: Select all
wget http://whatismyip.org
cat index.html
85.*.*.*
visiting from a computer behind this router:
24.*.*.*
typing the command route results in this:
Code: Select all
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
85.*.*.* 192.168.1.1 255.255.255.255 UGH 0 0 0 br0
10.32.0.1 10.32.0.33 255.255.255.255 UGH 0 0 0 tun0
10.32.0.33 * 255.255.255.255 UH 0 0 0 tun0
192.168.1.0 * 255.255.255.0 U 0 0 0 br0
169.254.0.0 * 255.255.0.0 U 0 0 0 br0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 10.32.0.33 128.0.0.0 UG 0 0 0 tun0
128.0.0.0 10.32.0.33 128.0.0.0 UG 0 0 0 tun0
default 192.168.1.1 0.0.0.0 UG 0 0 0 br0
Code: Select all
br0 Link encap:Ethernet HWaddr BC:*:*:*:*:4C
inet addr:192.168.1.3 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:157010 errors:0 dropped:0 overruns:0 frame:0
TX packets:34883 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:25754616 (24.5 MiB) TX bytes:22261545 (21.2 MiB)
br0:0 Link encap:Ethernet HWaddr BC:*:*:*:*:4C
inet addr:169.254.255.1 Bcast:169.254.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
eth0 Link encap:Ethernet HWaddr BC:*:*:*:*:4C
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:157027 errors:0 dropped:0 overruns:0 frame:0
TX packets:165044 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:29211084 (27.8 MiB) TX bytes:47704027 (45.4 MiB)
Interrupt:4 Base address:0x2000
eth1 Link encap:Ethernet HWaddr BC:*:*:*:*:4E
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:3 Base address:0x1000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MULTICAST MTU:16436 Metric:1
RX packets:113 errors:0 dropped:0 overruns:0 frame:0
TX packets:113 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:20074 (19.6 KiB) TX bytes:20074 (19.6 KiB)
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.32.0.34 P-t-P:10.32.0.33 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:102 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:14994 (14.6 KiB) TX bytes:0 (0.0 B)
vlan1 Link encap:Ethernet HWaddr BC:*:*:*:*:4C
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:21044 errors:0 dropped:0 overruns:0 frame:0
TX packets:136358 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4448643 (4.2 MiB) TX bytes:28951278 (27.6 MiB)
vlan2 Link encap:Ethernet HWaddr BC:*:*:*:*:4C
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:135982 errors:0 dropped:0 overruns:0 frame:0
TX packets:28686 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:21935905 (20.9 MiB) TX bytes:18752749 (17.8 MiB)
I've tried googling for the past few days so this is my last resort, any help is appreciated, thank you!