How do we modify TCP/IP from commandline to modify DNS servers for an VPN specific connection?

We are testing with the VPN Checkpoint FW client. When we connect to the VPN the FW/VPN module assigns an IP to the client computer that whant to remote in. This IP is configured those settings are configured at the firwall level for the VPN.

The problem is that no DNS can be configured when setting up the VPN TCP/IP at the firewall level. Running a quick "ipconfig/all" once the VPN client authenticates we see that the PC gets an IP and a gateway but no DNS are entered.

I was wondering if we could run some command line so the TCP/IP for that particular connection can be modified and the DNS servers can be added.

I am not sure if that is possible or if I was clear in my question. Please let me know if not.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


once you get the VPN connection then it will use your previous DNS ...that was available before the VPN ..

but yes it can be ...and the following commands used to change from CLI

to change IP and default gateway:
netsh int ip set address "your interface" static 1
to change DNS:
netsh int ip set dns "your interface" static primary

your interface may: local area connection or local area connection 2 or wireless or the VPN interface ..

this apeears by ipconfig /all  

do you use "Route all traffic through gateway" ? - if you are using this option then no DNS servers can be used or configured simply because all traffic will be routed through the gateway (not even client local subnet DNS servers).

if you are not using the given option the workstation will continue to use locally defined DNS servers, but this depends of the policy. Scripting these options (netsh ...) will not help you if the first scenario is being used. Can you give more details regarding your vpn setup ?


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Software Firewalls

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.