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

x
  • 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.

Thanks.  
0
llarava
Asked:
llarava
1 Solution
 
memo_tntCommented:
hi

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 192.168.0.101 255.255.255.0 192.168.0.254 1
 
to change DNS:
netsh int ip set dns "your interface" static 192.168.111.2 primary

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

this apeears by ipconfig /all  
0
 
predragpetrovicCommented:
hi,

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 ?

predrag
0

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