Port Forward to VPN client.


 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Port Forward to VPN client.
# 1  
Old 02-16-2020
Port Forward to VPN client.

Hi all,

I can't port forward from WAN to VPN Client. VPN Client Ubuntu 18 192.168.0.16 Port 6000

VPN Gateway for LAN clients Centos 192.168.0.12
Router 192.168.0.1

I can forward to the VPN Client if VPN is not connected if I forward Port 6000 from 192.168.0.1 directly to 192.168.0.16.
While it's connected to VPN it is not working, so I have tried to add to following rule on the VPN Gateway 192.168.0.12 and forward from 192.168.0.1 to 192.168.0.12

Code:
sysctl -w net.ipv4.ip_forward=1
iptables -t nat -A PREROUTING -d 192.168.0.12 -p tcp --dport 6000 -j DNAT --to-dest 192.168.0.16:6000
iptables -t nat -A POSTROUTING -d 192.168.0.12 -p tcp --dport 6000 -j SNAT --to-source 192.168.0.16

It's not working
Could someone please advise ?

Moderator's Comments:
Mod Comment Please do wrap your codes and samples in CODE TAGS as per forum rules.

Last edited by RavinderSingh13; 02-16-2020 at 07:04 AM..
# 2  
Old 02-16-2020
Please explain what you mean by "It's not working".

How do you know it is "not working"?

What did you try? How did you debug?

Thanks.
# 3  
Old 02-17-2020
Hi,


I can reach port 6000 via my DNS over internet if the client is not connected to VPN.


I can't reach port 6000 via my DNS over internet if the client is connected to VPN.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. IP Networking

VPN Server & Client

First of all, hello. I have a problem installing a vpn server and client. My server is a computer running windows 7, and windows, running a virtual machine running debian. In the debian system, I've the vpn server installed (SoftEther VPN Server) The problems come when I try to connect to... (1 Reply)
Discussion started by: Blues23
1 Replies

2. Debian

Iptables Nat forward port 29070

Hello, the Nat and the forward worked on my debian server up to the reboot of machines. The following rules*: /sbin/iptables -t nat -A PREROUTING -p tcp -i eth2 -d xxx.xxx.xxx.xxx --dport 29070 -j DNAT --to-destination 10.0.1.7:29070 /sbin/iptables -A FORWARD -p tcp -i eth2 -o eth0 -d... (0 Replies)
Discussion started by: titoms
0 Replies

3. UNIX for Advanced & Expert Users

ipf/ipnat NAT/port forward issues

I've been going crazy trying to get this working. Here's the situation: we have a Solaris 10 box that connects an internal network to an external network. We're using ipf/ipnat on it. We've added a couple of new boxes to the internal network (192.168.1.100, .101) and want to be able to get to port... (1 Reply)
Discussion started by: spakov
1 Replies

4. Solaris

Is there a VPN client that can be used on solaris 10 ?

I need to install VPN client on Solaris 10 server. I searched but only Cisco client was available which requires a service agreement. Please suggest some free ware for this and the steps to do that too as i am net to Solaris Admin tasks. (1 Reply)
Discussion started by: kukretiabhi13
1 Replies

5. UNIX for Dummies Questions & Answers

Problem when I try to Install a Client VPN Cisco

Hi Gurus of UNIX, I have a problem when I try to install a software VPN Cisco in Laptop (HP530). I do the following procedures: Part 2 - VPN Client Compilation We will now set up the vpn client. As there is no official Cisco VPN Client for OpenSolaris X86 available, we will use vpnc.... (1 Reply)
Discussion started by: andresguillen
1 Replies

6. IP Networking

port forward & DYNDNS Inquiry

Hi, Is there anyone know how to make port forward? And also, how to set up DYNDNS with router? (1 Reply)
Discussion started by: eel
1 Replies

7. Red Hat

cisco anyconnect VPN client installation??

Anyone had installed Cisco AnyConnect VPN client on RedHat5.3 EL or CentOS 5.3? I tried on CentOS 5.3 but always getting host unreachable error. Same for windows xp works fine. The error log reports: Sep 1 19:14:03 localhost vpnagent: Function: tableCallbackHandler File: RouteMgr.cpp Line:... (3 Replies)
Discussion started by: zing_foru
3 Replies

8. UNIX for Advanced & Expert Users

ssh port forward over three server

Hello there, I have a big problem, and I hope somebody can help me. I try to realize a port forward over three server. Here is a picture... Client Server1 | Server2 ------- ------- | ------- |...... | |...... | | |...... ... (2 Replies)
Discussion started by: Art007
2 Replies

9. IP Networking

Cisco vpn client

Who in the 64 ubuntu adopted cisco vpn client on the wireless network I downloaded the cisco vpn client for linux but run vpn_install make file when an error in cisco with the help of the document read in half a day, nor do I know this vpn client in the 64 systems in use. Who can help me, a... (1 Reply)
Discussion started by: Eason
1 Replies

10. Cybersecurity

VPN client for linux?...

I'm looking for an open source VPN client that I can set up on RedHat 7.1. Any suggestion? Thanks in advance. VJ :) (3 Replies)
Discussion started by: vancouver_joe
3 Replies
Login or Register to Ask a Question