OpenVPN: Allow access only for local connections (via OpenVPN)

Jhourlad Estrella

I was recently assigned a task to do set up a secure development environment. I am thinking of doing the following:

  1. Use OpenVPN to connect to the server.
  2. Use firewall rules to block all incoming connections outside the local network
  3. Services will include SHH, HTTP/HTTPS and git

Is this possible?

UPDATE: I guess the more appropriate question is how to block access outside the local network.

geoffmcc

Should be pretty easy with UFW.

Assuming your range is something like 192.168.1.x it would be something like

sudo ufw allow from 192.168.1.0/24 to any port 22
sudo ufw allow from 192.168.1.0/24 to any port 80
sudo ufw allow from 192.168.1.0/24 to any port 443

If you want to limit access to an exact IP address it would be something like

sudo ufw allow form xxx.xxx.x.x to any port 22

Basically just check out UFW - Community Help Wiki and brush up on UFW.

Also, if you want to restrict access to VPN the ports are usually

 1701/tcp, 4500/udp, and 500/udp

but you may want to look that up to be sure

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Rerouting traffic from OpenVPN client for local-only access

From Dev

Virtualbox and OpenVPN connections

From Dev

How to enable OpenVPN access to ONLY the internal LAN

From Dev

Allow clients in network to communicate to client connected via OpenVPN

From Dev

MiniDLNa local AND over openvpn

From Dev

Openvpn client on local server

From Dev

OpenWRT OpenVPN LAN access

From Dev

OpenVPN to Access Remote Desktop

From Dev

OpenVPN - Password Authentication Only

From Dev

How can I access server localhost ports via OpenVPN connection?

From Dev

How to only go via OpenVPN server for certain IPs

From Dev

OpenVPN Client and Server on same machine - Server doesn't allow connections when client is connected

From Dev

OpenVPN Client and Server on same machine - Server doesn't allow connections when client is connected

From Dev

how to setup browsing via OpenVPN?

From Dev

Issue installing OpenVPN via apt

From Dev

OpenVPN does not connect VIA FrootVPN

From Dev

Redirect a range of IPs via OpenVpn

From Dev

Connecting 3 OpenVPN connections through a shell script

From Dev

How does the OpenVPN service start connections by default?

From Dev

Where is the Openvpn Access Server API

From Dev

OpenVPN Access Server and Network Manager

From Dev

Cannot access internet through OpenVPN

From Dev

Can Connect to OpenVPN but no internet access

From Dev

OpenVPN LAN Access in Windows 10

From Dev

OpenVPN DD WRT route tun1 to allow access from other PC's

From Dev

openvpn configure iptables to allow only port 80/443 and throttle all other

From Dev

OpenVPN client should only communicate to VPN server via tunnel; rest via regular NIC

From Dev

OpenVPN in LXC: Failed to set devices.allow

From Dev

How do I forward a port 80 on my local pc connected to a droplet via OpenVPN

Related Related

  1. 1

    Rerouting traffic from OpenVPN client for local-only access

  2. 2

    Virtualbox and OpenVPN connections

  3. 3

    How to enable OpenVPN access to ONLY the internal LAN

  4. 4

    Allow clients in network to communicate to client connected via OpenVPN

  5. 5

    MiniDLNa local AND over openvpn

  6. 6

    Openvpn client on local server

  7. 7

    OpenWRT OpenVPN LAN access

  8. 8

    OpenVPN to Access Remote Desktop

  9. 9

    OpenVPN - Password Authentication Only

  10. 10

    How can I access server localhost ports via OpenVPN connection?

  11. 11

    How to only go via OpenVPN server for certain IPs

  12. 12

    OpenVPN Client and Server on same machine - Server doesn't allow connections when client is connected

  13. 13

    OpenVPN Client and Server on same machine - Server doesn't allow connections when client is connected

  14. 14

    how to setup browsing via OpenVPN?

  15. 15

    Issue installing OpenVPN via apt

  16. 16

    OpenVPN does not connect VIA FrootVPN

  17. 17

    Redirect a range of IPs via OpenVpn

  18. 18

    Connecting 3 OpenVPN connections through a shell script

  19. 19

    How does the OpenVPN service start connections by default?

  20. 20

    Where is the Openvpn Access Server API

  21. 21

    OpenVPN Access Server and Network Manager

  22. 22

    Cannot access internet through OpenVPN

  23. 23

    Can Connect to OpenVPN but no internet access

  24. 24

    OpenVPN LAN Access in Windows 10

  25. 25

    OpenVPN DD WRT route tun1 to allow access from other PC's

  26. 26

    openvpn configure iptables to allow only port 80/443 and throttle all other

  27. 27

    OpenVPN client should only communicate to VPN server via tunnel; rest via regular NIC

  28. 28

    OpenVPN in LXC: Failed to set devices.allow

  29. 29

    How do I forward a port 80 on my local pc connected to a droplet via OpenVPN

HotTag

Archive