Skip to content

Instantly share code, notes, and snippets.

View rstrlcpy's full-sized avatar

Roman Strashkin rstrlcpy

  • Nexenta Systems Inc.
  • Russia, Krasnodar
View GitHub Profile
@rstrlcpy
rstrlcpy / api.go
Last active July 28, 2020 07:16
go gin-gonic help-wrapper
package api
import (
"context"
"fmt"
"net/http"
"time"
"github.com/gin-gonic/gin"
How to configure iptables for openvpn
If you have installed the openvpn server and iptable is blocking the service by default then use these configurations for openvpn to function properly. First let's allow the tcp connection on the openvpn port. If you are using udp or another port number then change this line accordingly.
iptables -A INPUT -i eth0 -m state --state NEW -p udp --dport 1194 -j ACCEPT
Allow TUN interface connections to OpenVPN server
iptables -A INPUT -i tun+ -j ACCEPT
Allow TUN interface connections to be forwarded through other interfaces
iptables -A FORWARD -i tun+ -j ACCEPT