vpn and dns/dhcp/firewall not on the same server
Posted: Wed Aug 27, 2014 10:31 am
Hi,
My config :
. VPN server = MAYO - OS debian
openvpn installed
ip-wan = 48.xxx.xxx.253 (eth1)
ip-lan = 192.168.1.19 (eth0)
gw = 48.xxx.xxx.249
vpn network = 192.168.3.0/24
ip-vpn server = 192.168.3.1 (tun0)
. DNS/DHCP/Firewall server = GOZO - OS debian
ip-wan = 48.xxx.xxx.251 (eth1)
ip-lan = 192.168.1.2 (eth0)
gw = 48.xxx.xxx.249
internal network = netwhome
. server.conf =
port 1194
proto udp
dev tun0
ca ca.crt
cert mayo.crt
key mayo.key
dh dh1024.pem
server 192.168.3.0 255.255.255.0
ifconfig-pool-persist ipp.txt
client-config-dir ccd
route 192.168.3.0 255.255.255.0
push "dhcp-option DNS 193.xxx.xxx.xxx"
push "dhcp-option DNS 192.168.1.2"
client-to-client
keepalive 10 120
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
status openvpn-status.log
log openvpn.log
log-append openvpn.log
verb 4
. ccd/client1 conf =
ifconfig-push 192.168.3.5 192.168.3.6
push "route 192.168.1.0 255.255.255.0"
push "redirect-gateway def1 bypass-dhcp"
. conf client1 (OS: Windows7) =
client
dev tun
proto udp
remote 48.xxx.xxx.253 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client1.crt
key client1.key
comp-lzo
verb 5
float
route-method exe
route-delay 2
. iptables/rules =
on MAYO = nothing
on GOZO =
ACCEPT all -- 192.168.3.0/24 netwhome/24
port 1194 opened
. GOZO : route -nv =
Destination | Gateway | Genmask | Flags | Metric | Ref | Use | Iface
0.0.0.0 | 48.xxx.xxx.249 | 0.0.0.0 | UG | 50 | 0 | 0 | eth1
0.0.0.0 | 192.168.1.2 | 0.0.0.0 | UG | 100 | 0 | 0 | eth0
48.xxx.xxx.248 | 0.0.0.0 | 255.255.255.248 U | 0 | 0 | 0 | eth1
169.254.0.0 | 0.0.0.0 | 255.255.0.0 | U | 1000 | 0 | 0 | eth1
192.168.1.0 | 0.0.0.0 | 255.255.255.0 | U | 0 | 0 | 0 | eth0
. MAYO : route -nv =
Destination | Gateway | Genmask | Flags | Metric | Ref | Use | Iface
0.0.0.0 | 48.xxx.xxx.249 | 0.0.0.0 | UG | 50 | 0 | 0 eth1
0.0.0.0 | 192.168.1.2 | 0.0.0.0 | UG | 100 | 0 | 0 | eth0
48.xxx.xxx.248 | 0.0.0.0 | 255.255.255.248 | U | 0 | 0 | 0 | eth1
169.254.0.0 | 0.0.0.0 | 255.255.0.0 | U | 1000 | 0 | 0 | eth0
192.168.1.0 | 0.0.0.0 | 255.255.255.0 | U | 0 | 0 | 0 | eth0
192.168.3.0 | 192.168.3.2 | 255.255.255.0 | UG | 0 | 0 | 0 | tun0
192.168.3.2 | 0.0.0.0 | 255.255.255.255 | UH | 0 | 0 | 0 | tun0
My problem :
. client1 can connect to vpn server but can't connect to internet or to 192.168.1.0 network - only ping and dns resolution ok to VPN server
. if I install openvpn on GOZO server, all is ok.
Which config/route/firewall is missing (between MAYO/GOZO) ?
Any help would be appreciated.
Thank.
My config :
. VPN server = MAYO - OS debian
openvpn installed
ip-wan = 48.xxx.xxx.253 (eth1)
ip-lan = 192.168.1.19 (eth0)
gw = 48.xxx.xxx.249
vpn network = 192.168.3.0/24
ip-vpn server = 192.168.3.1 (tun0)
. DNS/DHCP/Firewall server = GOZO - OS debian
ip-wan = 48.xxx.xxx.251 (eth1)
ip-lan = 192.168.1.2 (eth0)
gw = 48.xxx.xxx.249
internal network = netwhome
. server.conf =
port 1194
proto udp
dev tun0
ca ca.crt
cert mayo.crt
key mayo.key
dh dh1024.pem
server 192.168.3.0 255.255.255.0
ifconfig-pool-persist ipp.txt
client-config-dir ccd
route 192.168.3.0 255.255.255.0
push "dhcp-option DNS 193.xxx.xxx.xxx"
push "dhcp-option DNS 192.168.1.2"
client-to-client
keepalive 10 120
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
status openvpn-status.log
log openvpn.log
log-append openvpn.log
verb 4
. ccd/client1 conf =
ifconfig-push 192.168.3.5 192.168.3.6
push "route 192.168.1.0 255.255.255.0"
push "redirect-gateway def1 bypass-dhcp"
. conf client1 (OS: Windows7) =
client
dev tun
proto udp
remote 48.xxx.xxx.253 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client1.crt
key client1.key
comp-lzo
verb 5
float
route-method exe
route-delay 2
. iptables/rules =
on MAYO = nothing
on GOZO =
ACCEPT all -- 192.168.3.0/24 netwhome/24
port 1194 opened
. GOZO : route -nv =
Destination | Gateway | Genmask | Flags | Metric | Ref | Use | Iface
0.0.0.0 | 48.xxx.xxx.249 | 0.0.0.0 | UG | 50 | 0 | 0 | eth1
0.0.0.0 | 192.168.1.2 | 0.0.0.0 | UG | 100 | 0 | 0 | eth0
48.xxx.xxx.248 | 0.0.0.0 | 255.255.255.248 U | 0 | 0 | 0 | eth1
169.254.0.0 | 0.0.0.0 | 255.255.0.0 | U | 1000 | 0 | 0 | eth1
192.168.1.0 | 0.0.0.0 | 255.255.255.0 | U | 0 | 0 | 0 | eth0
. MAYO : route -nv =
Destination | Gateway | Genmask | Flags | Metric | Ref | Use | Iface
0.0.0.0 | 48.xxx.xxx.249 | 0.0.0.0 | UG | 50 | 0 | 0 eth1
0.0.0.0 | 192.168.1.2 | 0.0.0.0 | UG | 100 | 0 | 0 | eth0
48.xxx.xxx.248 | 0.0.0.0 | 255.255.255.248 | U | 0 | 0 | 0 | eth1
169.254.0.0 | 0.0.0.0 | 255.255.0.0 | U | 1000 | 0 | 0 | eth0
192.168.1.0 | 0.0.0.0 | 255.255.255.0 | U | 0 | 0 | 0 | eth0
192.168.3.0 | 192.168.3.2 | 255.255.255.0 | UG | 0 | 0 | 0 | tun0
192.168.3.2 | 0.0.0.0 | 255.255.255.255 | UH | 0 | 0 | 0 | tun0
My problem :
. client1 can connect to vpn server but can't connect to internet or to 192.168.1.0 network - only ping and dns resolution ok to VPN server
. if I install openvpn on GOZO server, all is ok.
Which config/route/firewall is missing (between MAYO/GOZO) ?
Any help would be appreciated.
Thank.