openvpn_inc wrote
In OpenVPN Access Server you can use the DMZ function for this. Go to the Admin UI, go to User Permissions, look up a users and click on the more settings button. In the DMZ section input the IP address, protocol, and port, on the Access Server that you want to open up a port on. That port will then be redirected to this VPN client when it is connected.
Now I did that and pressed update server buttom. But it didn't happen. Here server's iptables during client connection. The port to be forwarded is 37969:
$ sudo iptables -t nat -L #The SSH access of my VPS is not root by defualt
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
AS0_NAT_PRE_REL_EST all -- anywhere anywhere state RELATED,ESTABLISHED
AS0_DNAT_PRE all -- anywhere anywhere mark match 0x1000000/0x1000000
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
AS0_NAT_POST_REL_EST all -- anywhere anywhere state RELATED,ESTABLISHED
AS0_NAT_PRE all -- anywhere anywhere mark match 0x2000000/0x2000000
AS0_DNAT_POST all -- anywhere anywhere mark match 0x1000000/0x1000000
Chain AS0_DNAT_POST (1 references)
target prot opt source destination
SNAT all -- anywhere anywhere to:172.27.224.1
Chain AS0_DNAT_PRE (1 references)
target prot opt source destination
DNAT all -- anywhere anywhere mark match 0x1000100/0x1ffff00 to:172.27.232.3
ACCEPT all -- anywhere anywhere
Chain AS0_NAT (3 references)
target prot opt source destination
SNAT all -- anywhere anywhere to:172.27.135.28
ACCEPT all -- anywhere anywhere
Chain AS0_NAT_POST_REL_EST (1 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere
Chain AS0_NAT_PRE (1 references)
target prot opt source destination
AS0_NAT all -- anywhere anywhere mark match 0x8000000/0x8000000
AS0_NAT_TEST all -- anywhere 169.254.0.0/16
AS0_NAT_TEST all -- anywhere 192.168.0.0/16
AS0_NAT_TEST all -- anywhere 172.16.0.0/12
AS0_NAT_TEST all -- anywhere 10.0.0.0/8
AS0_NAT all -- anywhere anywhere
Chain AS0_NAT_PRE_REL_EST (1 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere
Chain AS0_NAT_TEST (4 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere mark match 0x4000000/0x4000000
ACCEPT all -- anywhere 172.27.224.0/20
AS0_NAT all -- anywhere anywhere