How do I set up this?
-
Hi!
I am Norwegian, so sorry my poor English.1: My ISP only gives me 4 public IPs. I can not get static IPs.
2: I have pfsense router. It routes 10.0.0.15 - 10.0.0.254 currently.
3: I have debian box in Netherlands. It have 4 public static IPs (xxx.xxx.xxx.105, xxx.xxx.xxx.111, xxx.xxx.xxx.118, xxx.xxx.xxx.138)
4: I have OpenVPN server at the debian box. I use shared key.
5: I want to get pfSense to connect to the OpenVPN server and give LAN-device with IP 10.0.0.22 the public IP xxx.xxx.xxx.118 or .138.But I don't know how to set this up.
I think I have successfully connected the pfSense box to the Debian box, but I don't know about it really works or not. The status says it's UP, and it have IP and gateway. (With shared key)I have tried:
- NAT 1:1, interface OpenVPN, assigned xxx.xxx.xxx.138 to 10.0.0.22. I dont think it worked.
- Virtual IP (WAN interface, xxx.xxx.xxx.138). I dont think it worked.
DEBIAN-BOX IN NETHERLANDS, /etc/network/interfaces
I have censored the IP (Because this is a public forum), and commented eth0:0, eth0:1 and eth0:3 (Because I think I have to free the IPs?)auto eth0 iface eth0 inet static address xxx.xxx.xxx.105 gateway xxx.xxx.xxx.1 netmask 255.255.255.0 iface eth0 inet6 static up echo 0 > /proc/sys/net/ipv6/conf/all/autoconf up echo 0 > /proc/sys/net/ipv6/conf/default/autoconf netmask 64 gateway xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx address xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx up ifconfig eth0 add xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx up ifconfig eth0 add xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx up ifconfig eth0 add xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx #auto eth0:0 #iface eth0:0 inet static # address xxx.xxx.xxx.111 # gateway xxx.xxx.xxx.1 # netmask 255.255.255.0 #auto eth0:1 #iface eth0:1 inet static # address xxx.xxxx.xxx.118 # gateway xxx.xxx.xxx.1 # netmask 255.255.255.0 #auto eth0:2 #iface eth0:2 inet static # address xxx.xxx.xxx.138 # gateway xxx.xxx.xxx.1 # netmask 255.255.255.0 auto lo iface lo inet loopback
DEBIAN-BOX IN NETHERLANDS, /etc/openvpn/server.conf
dev tun proto udp ifconfig xxx.xxx.xxx.105 255.255.255.0 #optional: runs /etc/openvpn/add_routes.sh when the connection is established] #up ./add_routes.sh secret /etc/openvpn/mykey port 1197 user nobody group nogroup comp-lzo ping 15 ping-restart 45 ping-timer-rem persist-tun persist-key verb 3
DEBIAN-BOX IN NETHERLANDS, /etc/openvpn/tun0.conf
dev tun0 ifconfig xxx.xxx.xxx.105 xxx.xxx.xxx.111 ##Why do I have to insert two IPs here?... #secret /etc/openvpn/static.key cipher AES-128-CBC secret /etc/openvpn/mykey
So…
What to do with the pfSense box? :)