Sponsored Content
Full Discussion: Port Forward to VPN client.
Operating Systems Linux Red Hat Port Forward to VPN client. Post 303044172 by stinkefisch on Sunday 16th of February 2020 05:49:21 AM
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..
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
SHOREWALL-EXCLUSION(5)						  [FIXME: manual]					    SHOREWALL-EXCLUSION(5)

NAME
exclusion - Exclude a set of hosts from a definition in a shorewall configuration file. SYNOPSIS
!address-or-range[,address-or-range]... !zone-name[,zone-name]... DESCRIPTION
The first form of exclusion is used when you wish to exclude one or more addresses from a definition. An exclaimation point is followed by a comma-separated list of addresses. The addresses may be single host addresses (e.g., 192.168.1.4) or they may be network addresses in CIDR format (e.g., 192.168.1.0/24). If your kernel and iptables include iprange support, you may also specify ranges of ip addresses of the form lowaddress-highaddress No embedded whitespace is allowed. Exclusion can appear after a list of addresses and/or address ranges. In that case, the final list of address is formed by taking the first list and then removing the addresses defined in the exclusion. Beginning in Shorewall 4.4.13, the second form of exclusion is allowed after all and any in the SOURCE and DEST columns of /etc/shorewall/rules. It allows you to omit arbitrary zones from the list generated by those key words. Warning If you omit a sub-zone and there is an explicit or explicit CONTINUE policy, a connection to/from that zone can still be matched by the rule generated for a parent zone. For example: /etc/shorewall/zones: #ZONE TYPE z1 ip z2:z1 ip ... /etc/shorewall/policy: #SOURCE DEST POLICY z1 net CONTINUE z2 net REJECT /etc/shorewall/rules: #ACTION SOURCE DEST PROTO DEST # PORT(S) ACCEPT all!z2 net tcp 22 In this case, SSH connections from z2 to net will be accepted by the generated z1 to net ACCEPT rule. In most contexts, ipset names can be used as an address-or-range. Beginning with Shorewall 4.4.14, ipset lists enclosed in +[...] may also be included (see shorewall-ipsets[1] (5)). The semantics of these lists when used in an exclusion are as follows: o !+[set1,set2,...setN] produces a packet match if the packet does not match at least one of the sets. In other words, it is like NOT match set1 OR NOT match set2 ... OR NOT match setN. o +[!set1,!set2,...!setN] produces a packet match if the packet does not match any of the sets. In other words, it is like NOT match set1 AND NOT match set2 ... AND NOT match setN. EXAMPLES
Example 1 - All IPv4 addresses except 192.168.3.4 !192.168.3.4 Example 2 - All IPv4 addresses except the network 192.168.1.0/24 and the host 10.2.3.4 !192.168.1.0/24,10.1.3.4 Example 3 - All IPv4 addresses except the range 192.168.1.3-192.168.1.12 and the network 10.0.0.0/8 !192.168.1.3-192.168.1.12,10.0.0.0/8 Example 4 - The network 192.168.1.0/24 except hosts 192.168.1.3 and 192.168.1.9 192.168.1.0/24!192.168.1.3,192.168.1.9 Example 5 - All parent zones except loc any!loc FILES
/etc/shorewall/hosts /etc/shorewall/masq /etc/shorewall/rules /etc/shorewall/tcrules SEE ALSO
shorewall(8), shorewall-accounting(5), shorewall-actions(5), shorewall-blacklist(5), shorewall-hosts(5), shorewall_interfaces(5), shorewall-ipsets(5), shorewall-maclist(5), shorewall-masq(5), shorewall-nat(5), shorewall-netmap(5), shorewall-params(5), shorewall-policy(5), shorewall-providers(5), shorewall-proxyarp(5), shorewall-rtrules(5), shorewall-routestopped(5), shorewall-rules(5), shorewall.conf(5), shorewall-secmarks(5), shorewall-tcclasses(5), shorewall-tcdevices(5), shorewall-tcrules(5), shorewall-tos(5), shorewall-tunnels(5), shorewall-zones(5) NOTES
1. shorewall-ipsets http://www.shorewall.net/manpages/shorewall-ipsets.html [FIXME: source] 06/28/2012 SHOREWALL-EXCLUSION(5)
All times are GMT -4. The time now is 04:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy