Category Archives: OpenVPN

[OpenVPN] Build RPM in CentOS 6.5

CentOS 6.5 x64 yum update -y install openssl openssl-devel lzo lzo-devel pam_devel -y wget http://swupdate.openvpn.org/community/releases/openvpn-2.3.6.tar.gz rpm-build -tb openvpn-2.3.6.tar.gz

Posted in OpenVPN | Leave a comment

OpenVPN 備援路由

先確認網路卡組態設定 第一張網卡 eth0 有設定 gateway 第二張網卡 eth1 沒有設定 gateway 這樣啟動時網路路由只有第一組的預設路由 接著編輯/etc/rc.locl 加入下面兩個設定 開機時自動加入第二組路由 route add default gw ..*.254 dev eth1 metric 10 調整備援路由切換時間,預設300 echo “10” > /proc/sys/net/ipv4/route/gc_timeout 最後可以檢查路由表 [root@twaren3-132 ~]# route -n Kernel IP routing table Destination Gateway Genmask Flags … Continue reading

Posted in Linux, OpenVPN | Leave a comment

Openvpn logrotate.d 設定

編輯/etc/logrotate.d/openvpn

Posted in Linux, OpenVPN | Leave a comment

OpenVPN: 解決動態ip的問題

為了要使得VPN Server可以同時掛兩個ip (有點線路備援的意味,不過當主要gateway沒了,其實也掰了,假備援啊) 這時候如果client連線到server主要的ip時,因為回去的預設路由一樣,所以會正常 如果連線的是次要的ip時,會因為來的路跟回去的路不一樣導致TLS交握錯誤 這時候可以在client.conf內加入”float”就解決了 以下是原廠的解釋 –float Allow remote peer to change its IP address and/or port number, such as due to DHCP (this is the default if –remote is not used). –float when specified with –remote allows an … Continue reading

Posted in OpenVPN | Leave a comment

開啟封包轉送

臨時做法 echo “1” > /proc/sys/net/ipv4/ip_forward 永久做法 把 echo “1” > /proc/sys/net/ipv4/ip_forward 放入 /etc/rc.local 或 編輯 /etc/sysctl.conf ,將 net.ipv4.ipforward 設為1

Posted in Linux, OpenVPN | Leave a comment

有空的話…

再來補一下vpn、radius、mysql cluster、radius with mysql的操作說明好了 避免我之後也忘了 Orz

Posted in MySQL, OpenVPN, Radius | Leave a comment

OpenVPN 中設定tcp、udp的選擇

參考 www.tummy.com We are currently using an OpenVPN configuration based on the version 1 code. Back then, you had to use one port for every connection. Version 2 implemented a server mode where a single server port could deal with … Continue reading

Posted in OpenVPN | Comments Off on OpenVPN 中設定tcp、udp的選擇