Thread
:
[Announce] OpenConnect (-GUI) VPN client
View Single Post
tirtawn
2010-07-29 , 04:38
Posts: 328 | Thanked: 101 times | Joined on Dec 2009
#
39
Originally Posted by
gjoe
thanks. by the way, can you share on how to create the scripts for DNS and routing?
Dont laugh. this is really a quick hack.
You will need to find all the IP Address that you need to access example: 10.80.3.3 , 10.80.3.1, 10.80.3.2, etc.
You will also need to know the DNS of your company (you can find it when you connecting using your windows/linux machine)
Example:
company.sh
-----------------------
cd /home/user/company
route add 10.80.3.3 dev tun0
route add 10.80.3.2 dev tun0
route add 10.80.3.1 dev tun0
cp ./resolv.conf.company /etc/resolv.conf
resolv.conf.company
---------------------------------
nameserver 10.80.3.1
resolv.conf.normal
--------------------------
nameserver 127.0.0.1
normal.sh
---------------
cd /home/user/company
route add default gw 192.168.2.1 ---> change this to your default gw
cp resolv.conf.normal /etc/resolv.conf
Once you are connected using the openconnect, (put openconnect on background),
then execute the company.sh
try microb -> you should be able to access the intranet (i will assume you have stored the ip address in the router table above)
when you are done, close your openconnect.
revert back your normal gateway and DNS.
Its a quick and dirty but it works.
I am sure there is a better way to do this. I am open for suggestion.
Quote & Reply
|
tirtawn
View Public Profile
Send a private message to tirtawn
Find all posts by tirtawn