MattGibson Posted June 17, 2010 Posted June 17, 2010 Hi Everyone, I have just managed to set-up OpenVPN on Ubuntu everything is working and connecting fine apart from internet explorer - I want all web traffic to be routed through the open access server. FireFox is working fine with the schools proxy details but IE just wont connect. Anyone using OpenVPN? or managed to achieve routing all traffic? Regards Matt
RabbieBurns Posted June 18, 2010 Posted June 18, 2010 I always had to do something like iptables -t nat -A POSTROUTING -s $PRIVATE -o eth0 -j MASQUERADE to get openvpn working.. Also, did you remember to echo 1 > /proc/sys/net/ipv4/ip_forward 1
MattGibson Posted June 21, 2010 Author Posted June 21, 2010 Hi There, Thanks for your reply i simply copied and pasted: iptables -t nat -A POSTROUTING -s $PRIVATE -o eth0 -j MASQUERADE But this returned Bad command. your second comment says have i tried echo 1 > /proc/sys/net/ipv4/ip_forward I'm not actually sure what this is as i'm new to all this. Could you give me some sort of guide? it would be really useful to get this up and running. Many Thanks Matt Gibson
pete Posted June 21, 2010 Posted June 21, 2010 $PRIVATE in the nat command is a variable, like $foo or $bar. Fill in the appropriate source IP. 1
MattGibson Posted June 21, 2010 Author Posted June 21, 2010 Source being my Proxy or Router? Cheers Matt
RabbieBurns Posted June 21, 2010 Posted June 21, 2010 iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE This command assumes that the VPN subnet is 10.8.0.0/24 (taken from the server directive in the OpenVPN server configuration) and that the local ethernet interface is eth0. HOWTO Also, the echo 1 > /proc/sys/net/ipv4/ip_forward line edits the file ip_forward in /proc/sys/net/ipv4 and puts a 1 into the file, to enable Ip Forwarding (routing?) 1
MattGibson Posted June 21, 2010 Author Posted June 21, 2010 (edited) Hi Guys, Really sorry to be a pain but i've run the above commands and still not getting anywhere. Here's my setup: OpenVPN Server is on 10.18.52.2 Router is 10.18.55.254 Proxy is 10.18.52.11 Using Layer 2 (to get IP address from DHCP server) iptables -t nat -A POSTROUTING -s 10.18.52.0/24 -o eth0 -j MASQUERADE and tried echo 1 > /proc/sys/net/ipv4/ip_forward Also manually looked into the IP_forward file and it has a 1 listed. My Client needs to be routed through our Proxy on site which is 10.18.52.11 port 8000 Also manually looked into the IP_forward file and it has a 1 listed. Edited June 21, 2010 by MattGibson
RabbieBurns Posted June 21, 2010 Posted June 21, 2010 the -s should be the IP of the Tunnel network I think. what have you specified in the openvpn config? For example, my network is 192.168.2.0/24 so I made the tunnel network 10.0.8.0/24 What subnet mask are you using on your 10.18 network?
MattGibson Posted June 21, 2010 Author Posted June 21, 2010 Hi Everyone, I've now switched it back to Layer 3 and now everything is working! I confused myself by changing it to Layer 2. Thanks to everyone for you input into this. I may need to open a new thread for this but its regarding OpenVPN. In our school we have two networks Admin and Curriculum when I install Open VPN on a curriculum laptop I will need to cross-over to our admin network to connect to our MIS (SIMS) However I've tested this and it wont let me. Can anyone advise a work around for this? I was hoping to use OpenVPN for this purpose. Ping Results Main Forest Root (curriculum) Server-001.curriculum.internal This ping's fine when I run > Ping Server Main Admin Network (Admin containing MIS) Admin-001.admin.internal This doesn't when I run > Ping admin-001 "No Reply" This ping's fine when I run > Ping admin-001.admin.internal I have tried running the UNC path to the simshare but obviously no reply.
RabbieBurns Posted June 21, 2010 Posted June 21, 2010 Do you have trusts set up between the domains? Are the domains on the same physical network / subnet ?
MattGibson Posted June 21, 2010 Author Posted June 21, 2010 Hi There, Yes, We have a trust between the two domains and they are on the same subnet and physical network.
RabbieBurns Posted June 21, 2010 Posted June 21, 2010 Im a bit lost.. I dont really understand what you are trying to achieve with openvpn ? If pings to the FQDN arent working, can you ping the IP of the hosts.. If so, I reckon its just DNS you have to look at ...
MattGibson Posted July 13, 2010 Author Posted July 13, 2010 Hi Guys, Is it possible for OpenVPN Client to run a script after its connected. Basically I want staff to be able to connect to the network when they are at home OpenVPN seems to do everything I want it to but after its connected I want a .BAT to run so that it will map the network drives. Regards Matt
MattGibson Posted July 15, 2010 Author Posted July 15, 2010 Does anyone know, I'm pretty sure its to do with the Client Config Directives to make this happen but none are working for me.
dcross Posted August 14, 2010 Posted August 14, 2010 Im a bit lost.. I dont really understand what you are trying to achieve with openvpn ? If pings to the FQDN arent working, can you ping the IP of the hosts.. If so, I reckon its just DNS you have to look at ... Ok I've resolved this. On "VPN Settings > Routing > Specify the private subnets to which all clients should be given access" I made the internal network entry more specific. It was 10.0.0.0/8 and I changed it to 10.1.1.0/24 Then further down under "DNS Settings" I selected "Have clients use these DNS servers:" and I specified the internal DNS servers on the network. I saved and updated the server and reconnected the client. I can now resolve computer names on the remote network. Regards, David.
dcross Posted August 14, 2010 Posted August 14, 2010 Matt, Have you got your LDAP user accounts assigned to OpenVPN groups? I've not managed to get this to work yet. To get mapped drives working the script needs to be configured in the OpenVPN user group settings. But there doesn't seem to be an obvious way of telling OpenVPN which group an LDAP user belongs to. I'm waiting for OpenVPN to tell me more about this. Regards, David.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now