Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 278
  • Last Modified:

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.

1 Solution

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 ?


Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now