Static IP for VPN client on ASUS
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
-
- OpenVpn Newbie
- Posts: 3
- Joined: Thu Feb 11, 2016 8:41 am
Static IP for VPN client on ASUS
Hi Everyone,
I want to assign a static IP adres to a client on a ASUS router. Is that possible? I want to run script to the client and DNS is not working properly on a ASUS router and therefore not able to track the specific client.
If have tried "Manage Client-Specific Options" and edit the files and add --ifconfig-push but its not working.
Has anyone has any idea how to configure this or get it working?
Regards, ahofr
I want to assign a static IP adres to a client on a ASUS router. Is that possible? I want to run script to the client and DNS is not working properly on a ASUS router and therefore not able to track the specific client.
If have tried "Manage Client-Specific Options" and edit the files and add --ifconfig-push but its not working.
Has anyone has any idea how to configure this or get it working?
Regards, ahofr
- Traffic
- OpenVPN Protagonist
- Posts: 4066
- Joined: Sat Aug 09, 2014 11:24 am
Re: Static IP for VPN client on ASUS
What is the model number and operating system of the router ?ahofr wrote:I want to assign a static IP adres to a client on a ASUS router. Is that possible?
-
- OpenVpn Newbie
- Posts: 3
- Joined: Thu Feb 11, 2016 8:41 am
Re: Static IP for VPN client on ASUS
The model is a RT-AC87U and tried both original and ASUS-Merlin software code.
- Traffic
- OpenVPN Protagonist
- Posts: 4066
- Joined: Sat Aug 09, 2014 11:24 am
Re: Static IP for VPN client on ASUS
In order to assign static IPs to clients use:
--client-config-dir directive in server config and --ifconfig-push in the client config file.
See those options in The Manual v23x
Also see this HOWTO:
HOWTO: Expanding the scope of the VPN to include additional machines
You may have to use a custom config on your router.
--client-config-dir directive in server config and --ifconfig-push in the client config file.
See those options in The Manual v23x
Also see this HOWTO:
HOWTO: Expanding the scope of the VPN to include additional machines
You may have to use a custom config on your router.
-
- OpenVpn Newbie
- Posts: 3
- Joined: Thu Feb 11, 2016 8:41 am
Re: Static IP for VPN client on ASUS
Did you get it working? Because I was not able to get it working with ASUS-(Merlin) software code.
I already tried the commands already. The client config files are constantly overwritten by applying router changes and generate errors.
I already tried the commands already. The client config files are constantly overwritten by applying router changes and generate errors.
-
- OpenVpn Newbie
- Posts: 6
- Joined: Wed Apr 19, 2017 8:20 am
Re: Static IP for VPN client on ASUS
1. Im sorry to ask, how do i go about this on the Server Custom setting.Traffic wrote:In order to assign static IPs to clients use:
--client-config-dir directive in server config and --ifconfig-push in the client config file.
See those options in The Manual v23x
Also see this HOWTO:
HOWTO: Expanding the scope of the VPN to include additional machines
You may have to use a custom config on your router.
2. The config file that server create for client sort of combine everything into single .ovpn file. do I have to create CCD directory and another config file into the directory in client PC (windows)
-
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
Re: Static IP for VPN client on ASUS
[VPN] How to set up the ASUSWRT for VPN Server – OpenVPNekachaiz wrote:how do i go about this on the Server Custom setting
No .. on the Serverekachaiz wrote:do I have to create CCD directory and another config file into the directory in client PC (windows)
See --client-config-dir in The Manual v24x
-
- OpenVpn Newbie
- Posts: 6
- Joined: Wed Apr 19, 2017 8:20 am
Re: Static IP for VPN client on ASUS
Thank you for your replyTinCanTech wrote:[VPN] How to set up the ASUSWRT for VPN Server – OpenVPNekachaiz wrote:how do i go about this on the Server Custom setting
No .. on the Serverekachaiz wrote:do I have to create CCD directory and another config file into the directory in client PC (windows)
See --client-config-dir in The Manual v24x
I manage to get into Server configuration file by using telnet to router. After i added client configuration file and try to connect, i receive this error "There is a problem in your selection of --ifconfig endpoints [local=192.168.10.7, remote=255.255.255.0]. The local and remote VPN endpoints must exist within the same 255.255.255.252 subnet." This probably something wrong with my subnet mask setting but what value i should be using?
Here's my current configuration:
file: config.ovpn
CODE
# Automatically generated configuration
daemon
server 192.168.10.1 255.255.255.0
proto udp
multihome
port 1194
dev tun21
cipher AES-256-CBC
comp-lzo adaptive
keepalive 15 60
verb 3
push "route 192.168.2.0 255.255.255.0 vpn_gateway 500"
client-config-dir /etc/server1/ccd >>>> my ccd folder location
client-to-client
duplicate-cn
plugin /usr/lib/openvpn-plugin-auth-pam.so openvpn
client-cert-not-required
username-as-common-name
ca ca.crt
dh dh.pem
cert server.crt
key server.key
status-version 2
status status 10
Here is my client configuration
file: ccd/user1
CODE
ifconfig-push 192.168.10.20 255.255.255.0
-
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
Re: Static IP for VPN client on ASUS
Add to your server config:
See --topology in The Manual v24x
Code: Select all
topology subnet
-
- OpenVpn Newbie
- Posts: 6
- Joined: Wed Apr 19, 2017 8:20 am
Re: Static IP for VPN client on ASUS
Thank you for your guidance TinCanTech!! got it, manage to assign to fix ip now using reference from your linkTinCanTech wrote:Add to your server config:See --topology in The Manual v24xCode: Select all
topology subnet
now i can sleep peacefully"Each pair of ifconfig-push addresses represent the virtual client and server IP endpoints. They must be taken from successive /30 subnets in order to be compatible with Windows clients and the TAP-Windows driver. Specifically, the last octet in the IP address of each endpoint pair must be taken from this set:
[ 1, 2] [ 5, 6] [ 9, 10] [ 13, 14] [ 17, 18]
[ 21, 22] [ 25, 26] [ 29, 30] [ 33, 34] [ 37, 38]
[ 41, 42] [ 45, 46] [ 49, 50] [ 53, 54] [ 57, 58]
[ 61, 62] [ 65, 66] [ 69, 70] [ 73, 74] [ 77, 78]
[ 81, 82] [ 85, 86] [ 89, 90] [ 93, 94] [ 97, 98]
[101,102] [105,106] [109,110] [113,114] [117,118]
[121,122] [125,126] [129,130] [133,134] [137,138]
[141,142] [145,146] [149,150] [153,154] [157,158]
[161,162] [165,166] [169,170] [173,174] [177,178]
[181,182] [185,186] [189,190] [193,194] [197,198]
[201,202] [205,206] [209,210] [213,214] [217,218]
[221,222] [225,226] [229,230] [233,234] [237,238]
[241,242] [245,246] [249,250] [253,254]"
-
- OpenVpn Newbie
- Posts: 6
- Joined: Tue Aug 08, 2017 6:36 am
Re: Static IP for VPN client on ASUS
Hi guys! I will post in this thread don't want to open new one.
I have rt-ac88u with openvpn server here is configuration of the server i take it using putty throw ssh:
server 10.100.200.0 255.255.255.0
proto udp
multihome
port 33999
dev tun21
cipher AES-256-CBC
comp-lzo adaptive
keepalive 15 60
verb 3
push "route 192.168.199.0 255.255.255.0 vpn_gateway 500"
duplicate-cn
push "dhcp-option DNS 192.168.199.1"
tls-auth static.key 0
plugin /usr/lib/openvpn-plugin-auth-pam.so openvpn
client-cert-not-required
username-as-common-name
ca ca.crt
dh dh.pem
cert server.crt
key server.key
status-version 2
status status 10
I want to set up a static IP address for the client in Asus using stock firmware i hope it will work there is a custom configuration for the OpenVPN looks like this:
I have rt-ac88u with openvpn server here is configuration of the server i take it using putty throw ssh:
server 10.100.200.0 255.255.255.0
proto udp
multihome
port 33999
dev tun21
cipher AES-256-CBC
comp-lzo adaptive
keepalive 15 60
verb 3
push "route 192.168.199.0 255.255.255.0 vpn_gateway 500"
duplicate-cn
push "dhcp-option DNS 192.168.199.1"
tls-auth static.key 0
plugin /usr/lib/openvpn-plugin-auth-pam.so openvpn
client-cert-not-required
username-as-common-name
ca ca.crt
dh dh.pem
cert server.crt
key server.key
status-version 2
status status 10
I want to set up a static IP address for the client in Asus using stock firmware i hope it will work there is a custom configuration for the OpenVPN looks like this: