Linux/OpenVPN: Unterschied zwischen den Versionen
→WiFi Hotspots
Thomas (Diskussion | Beiträge) |
Thomas (Diskussion | Beiträge) |
||
Zeile 54: | Zeile 54: | ||
= WiFi Hotspots = | = WiFi Hotspots = | ||
Some Hotspots (for example Telekom Germany) do not allow UDP packets. In that case, configure OpenVPN to use TCP. | Some Hotspots (for example Telekom Germany) do not allow UDP packets. In that case, configure OpenVPN to use TCP. | ||
= Multiple OpenVPN servers on one machine (Gentoo) = | |||
Create 2 config files '''server1.conf''' and '''server2.conf''' in '''etc/openvpn''' with the content from above. Then change the following lines: | |||
server1.conf: | |||
port 12112 | |||
proto udp | |||
dev tun0 | |||
server 10.100.0.0 255.255.255.0 | |||
ifconfig-pool-persist ipp.txt | |||
server2.conf: | |||
port 3389 | |||
proto tcp | |||
dev tun1 | |||
server 10.200.0.0 255.255.255.0 | |||
ifconfig-pool-persist ipp2.txt | |||
Link to OpenRC config: | |||
ln -s /etc/init.d/openvpn /etc/init.d/openvpn.server1 | |||
ln -s /etc/init.d/openvpn /etc/init.d/openvpn.server2 | |||
Create 2 routes: | |||
iptables -t nat -A POSTROUTING -s 10.100.0.0/24 -o eth0 -j MASQUERADE | |||
iptables -t nat -A POSTROUTING -s 10.200.0.0/24 -o eth0 -j MASQUERADE | |||
Start both servers: | |||
/etc/init.d/openvpn.server1 start | |||
/etc/init.d/openvpn.server2 start | |||
Configure autostart: |