Tong
Tong

Reputation: 93

How to restrict the access IP of VPN users

I configured a VPN server(PPTP), and it works well. However, I just want people having IPs of specific address range can access to this server. So, what could I do to control or restrict the access IP address?

Upvotes: -2

Views: 410

Answers (2)

Valentin
Valentin

Reputation: 89

Why don't you configure your iptables firewall to allow only specific addresses for your VPN users and drop all others?

It should look like:

iptables -I FORWARD 1 -p tcp -s <your_vpn_pool> <your_targer_ip's> -j ACCEPT
iptables -I FORWARD 2 -p tcp -s <your_vpn_pool> -j REJECT

Look here for more examples about iptables config.

Upvotes: 0

user3299633
user3299633

Reputation: 3390

Why don't you just whitelist instead?

Upvotes: -1

Related Questions