Sponsored Content
Special Forums IP Networking 3 public servers: middle machine for traffic forwarding Post 303008256 by pedroz on Wednesday 29th of November 2017 10:36:31 AM
Old 11-29-2017
3 public servers: middle machine for traffic forwarding

With the following machines...
Server 1: PPTP client windows; Public IP: 1.1.1.1
Server 3: PPTP server centos6; Public IP: 3.3.3.3
Connecting VPN server3 from server1 works correctly!

Goal is to have a middle server forwarding traffic in both ways
Server 1: PPTP client windows; Public IP: 1.1.1.1
Server 2: Traffic forwarding centos6; Public IP: 2.2.2.2
Server 3: PPTP server centos6; Public IP: 3.3.3.3

Server1 connects with PPTP client to 2.2.2.2 and this server2 redirects to 3.3.3.3 (server3)
Is it possible to have that scenario?


Tried the following setup in Server2
1. Routing enabled
Code:
# echo "1" > /proc/sys/net/ipv4/ip_forward
# nano /etc/sysctl.conf
net.ipv4.ip_forward = 1
# sysctl -p

2. Iptables forward
Code:
# iptables -F -t nat
# iptables -F
# iptables -A FORWARD -d 3.3.3.3 -i eth0 -j ACCEPT
# iptables -t nat -A PREROUTING -i eth0 -d 2.2.2.2 -j DNAT --to-destination 3.3.3.3
# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
# iptables save
# iptables reload

When trying to connect with Server1 VPN PPTP client to 2.2.2.2, it redirects correctly to 3.3.3.3.
However, in server3 (3.3.3.3) it does not assign a PPTP client to 2.2.2.2.
Here is the connection log at server3

Code:
# tail -f /var/log/messages
Nov 29 09:53:39 office pptpd[2121]: CTRL: Client 2.2.2.2 control connection started
Nov 29 09:53:39 office pptpd[2121]: CTRL: Starting call (launching pppd, opening GRE)
Nov 29 09:53:39 office pppd[2122]: Plugin /usr/lib64/pptpd/pptpd-logwtmp.so loaded.
Nov 29 09:53:39 office pppd[2122]: pppd 2.4.5 started by root, uid 0
Nov 29 09:53:39 office pppd[2122]: Using interface ppp2
Nov 29 09:53:39 office pppd[2122]: Connect: ppp2 <--> /dev/pts/3
Nov 29 09:54:09 office pppd[2122]: LCP: timeout sending Config-Requests
Nov 29 09:54:09 office pppd[2122]: Connection terminated.
Nov 29 09:54:09 office pppd[2122]: Modem hangup
Nov 29 09:54:09 office pppd[2122]: Exit.
Nov 29 09:54:09 office pptpd[2121]: GRE:  read(fd=6,buffer=6124a0,len=8196) from PTY failed: status = -1 error =  Input/output error, usually caused by unexpected termination of pppd,  check option syntax and pppd logs
Nov 29 09:54:09 office pptpd[2121]: CTRL: PTY read or GRE write failed (pty,gre)=(6,7)
Nov 29 09:54:09 office pptpd[2121]: CTRL: Client 2.2.2.2 control connection finished

Any ideas to setup the server2 working as middle traffic forwarder?
 

9 More Discussions You Might Find Interesting

1. Solaris

Any tool to examine the error or traffic on the machine?

Hello all is there any graphic tool or not graphic tool that lets me examine or monitor the error in the system or data traffic ? Thanks for your help (2 Replies)
Discussion started by: umen
2 Replies

2. Cybersecurity

ssh X-forwarding and remote forwarding behind proxy

Hi, from my workplace we use a proxy to connect to the outside world, including external ssh servers. The problem is that the server is seeing the connection coming from the proxy and knows nothing about the client behind it. The ssh connection itself works fine, but x-forwarding does not work as... (1 Reply)
Discussion started by: vampirodolce
1 Replies

3. Red Hat

To find the LATEST file from a dir on REMOTE machine and SCP to local machine?

Hi All, URGENT - Please help me form a scipt for this: I need the LATEST file from a dir on REMOTE machine to be SCP'd to a dir on local machine. (and I need to execute this from local server) I know that the below cmd is used to find the LATEST file from a dir. But this command is not... (3 Replies)
Discussion started by: me_ub
3 Replies

4. IP Networking

Setting up private and public ip on same machine.

Hi, We have a ftp server which is running on public ip and out side of firewall. Users out side of our network and users of our local network both using the same public ip and doing upload and downloading. Last few days we are facing bandwidth problem as internal network users increased. ... (1 Reply)
Discussion started by: abduljabbar_11
1 Replies

5. SuSE

Regarding accessing multiple servers using single public ip address

Hello, Currently we are having different linux servers (for example: let's assume audio server, video server and text server) to handle requests from outside users. Suppose the outside users in different LAN (Local Area Network), other than the servers. For example user is in 20 series LAN and... (5 Replies)
Discussion started by: navneet_2009
5 Replies

6. UNIX for Advanced & Expert Users

Generate Public key for non ssh enabled servers

I am writing a script that needs to access various servers some of which are not ssh enabled. In order to access the ssh enabled servers I am using the following command to generate the public key : ssh-keygen -t rsa Is there a similar command for the other servers as well. If I try to use... (1 Reply)
Discussion started by: ravneet123
1 Replies

7. Linux

IP Traffic forwarding

Hello All I have the following setup of a network. Client machines sends requests to the server which is (192.168.1.50) running on Ubuntu server 8.04. And this server forwards all incoming traffic from clients to another server (192.168.1.100) when it's available. The availability is checked... (0 Replies)
Discussion started by: Anuradhai4i
0 Replies

8. Shell Programming and Scripting

What are public keys in ssh and how do we create the public keys??

Hi All, I am having knowledge on some basics of ssh and wanted to know what are the public keys and how can we create and implement it in connecting server. Please provide the information for the above, it would be helpful for me. Thanks, Ravindra (1 Reply)
Discussion started by: ravi3cha
1 Replies

9. Cybersecurity

Ssh acces without passwd from unique machine to all servers

hello i want to acces to many machines over LAN network from a unique machine , that allow me to use a SSH directly without password. i ama using redhat enterprise version . i didnt find the right way to realise that. what should i do at first ? (1 Reply)
Discussion started by: wassimpb
1 Replies
PPTPCTRL(8)						      System Manager's Manual						       PPTPCTRL(8)

NAME
pptpctrl - PPTP control connection manager SYNOPSIS
pptpctrl pptp-debug-flag no-ipparam-flag ppp-options-value ppp-speed-value ppp-local-ip-value ppp-remote-ip-value [ pptp-call-id ] [ ppp- binary ] [ pptp-logwtmp ] DESCRIPTION
pptpctrl is usually run by pptpd(8), but can also be run from inetd(8) if some of the features of pptpd(8), such as IP pool management, and inbuilt TCP wrappers, are not required. OPTIONS
pptpctrl options are unconventional, as they are designed for use by pptpd(8) rather than users. The option order is critical. Flag options consist of a 0 or 1, and must be present. Value options consist of a 0, or a 1 followed by the value. Either the 0 or both the 1 and the value must be present. The remaining options are optional, but must be present in the defined order. The options are as follows: pptp-debug-flag if set (1), enables debug messages to syslog from pptpctrl. This has no effect on the setting of the PPP debug option. no-ipparam-flag if set, pptpctrl will not pass the client's IP address to pppd(8) using the ipparam option. See the noipparam option in pptpd.conf(5). ppp-options-value file to use for PPP options. See the file option in pppd(8). ppp-speed-value value for the speed option given to pppd(8). Note that on Linux, this parameter is ineffective. ppp-local-ip-value if set, specifies the IP address that pppd(8) is to use for the network interface on the server. If not set, pppd(8) will determine it based on options; usually it will be the ethernet address of the server. ppp-remote-ip-value if set, specifies the IP address that pppd(8) is to use for the network interface on the client. If not set, pppd(8) will determine it based on options; usually it will be the ethernet address of the client, or an address given in chap-secrets. Must be set if ppp-local-ip-value is set. pptp-call-id if present, specifies the call identification for the PPTP session. If omitted, the call identification is zero. Normally the ID is allocated by pptpd(8) and passed to pptpctrl. ppp-binary if present, path to the PPP binary to use. If omitted, the default value is used. pptp-logwtmp if present, specifies whether wtmp(5) should be updated as users connect and disconnect. FILES
none. AUTHORS
Poptop is written by Matthew Ramsay <matthewr@moreton.com.au>, David Luyer <luyer@ucs.uwa.edu.au>, Kevin Thayer <tmk@netmagic.net>, Peter Galbavy <Peter.Galbavy@knowledge.com> and others. Development has been moved to SourceForge and worked on by Richard de Vroede <r.devroede@linvision.com> since June 26, 2002. COPYRIGHT
Copyright (C) 1999 Matthew Ramsay and others. Poptop is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Poptop is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Poptop; see the file COPYING. If not, write to the Free Soft- ware Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. AVAILABILITY
The most recent version of Poptop is available for download from SourceForge at http://sourceforge.net/projects/poptop. SEE ALSO
inetd(8), inetd.conf(5), pppd(8), pptpd(8), pptpd.conf(5), tcpd(8). 28 April 2004 PPTPCTRL(8)
All times are GMT -4. The time now is 03:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy