First some introduction, i'm trying to use smtp over vpn. So i can use my smtp sever from my isp even if i'm not at home.
I installed openvpn2 at my server, slackware 10.1. I put the openvpn client on my winxp laptop. I followed the static guide on the openvpn site. The vpn connection is working because i can browse my shares on the server. But I don't get internet working. I suppose it had something to do with routing on my server.
My situation:
[server ip: 192.168.0.100/24 gw: 192.168.0.1 vpn: 192.168.1.1/30]
|
|
[router ip 192.168.0.1/24]
|
|
Internet
|
|
[Laptop ip: 145.91.101.159/25 gw: 145.91.101.254 vpn: 192.168.1.1]
My server.conf
Code:
dev tun
ifconfig 192.168.1.1 192.168.1.2
secret /etc/openvpn/static.key
comp-lzo
keepalive 10 60
ping-timer-rem
persist-tun
persist-key
user nobody
group nobody
daemon
My client.conf
Code:
remote <server>
dev tun
ifconfig 192.168.1.2 192.168.1.1
secret "C:\\Program Files\\OpenVPN\\easy-rsa\\keys\\static.key"
comp-lzo
keepalive 10 60
ping-timer-rem
persist-tun
persist-key
route 192.168.0.0 255.255.255.0
ipconfig client:
Code:
Ethernet adapter VPN:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.1.2
Subnet Mask . . . . . . . . . . . : 255.255.255.252
Default Gateway . . . . . . . . . :
ifconfig server:
Code:
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:192.168.1.1 P-t-P:192.168.1.2 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP 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:100
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
The question is, what to do on the server, and maybe the client, to use my home router (192.168.0.1) when sending mail.