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
PPTPD(8)						      System Manager's Manual							  PPTPD(8)

NAME
pptpd - PPTP VPN daemon SYNOPSIS
pptpd [ options ] DESCRIPTION
pptpd is the Poptop PPTP daemon, which manages tunnelled PPP connections encapsulated in GRE using the PPTP VPN protocol. It may contain features like IP address management and TCP wrappers if compiled in. OPTIONS
Here we document the command line options. See pptpd.conf(5) for configuration directives, IP address allocation, routing, and firewall rules. -b|--bcrelay internal-interface specifies that broadcasts received on the server's internal network interface should be relayed to the clients. -c|--conf conf-file specifies the configuration file for pptpd (default /etc/pptpd.conf) -d|--debug turns on debugging mode, causing more debugging messages to be sent to syslog. -e|--ppp pppd-program use pppd-program in place of the default pppd(8). -f|--fg run in the foreground instead of detaching from terminal -h|--help display program usage. -i|--noipparam do not send the client's IP address to ip-up scripts (required if you are using the pppd(8) ipparam option for some other purpose). -l|--listen x.x.x.x specifies the local interface IP address to listen on. -o|--option ppp-conf-file specifies that pptpd should specify an alternate configuration file for the ppp daemon (the default is normally /etc/ppp/options but may vary depending on your ppp daemon). -p|--pidfile pid-file specifies an alternate location to store the process ID file (default /var/run/pptpd.pid). -s|--speed baud specifies that the speed baud should be passed to the ppp daemon as the tty speed to use (in some cases this is ignored by the ppp daemon). -t|--stimeout seconds specifies the number of seconds to wait for the first packet before dropping the connection. This is a denial of service protection feature. -w|--logwtmp update wtmp(5) as users connect and disconnect. See wtmp(1). -C|--connections n limits the number of client connections that may be accepted. Corresponds to the connections option in pptpd.conf. If pptpd is allocating IP addresses (e.g. --delegate is not used) then the number of connections is also limited by the remoteip option in pptpd.conf. -D|--delegate delegates the allocation of client IP addresses to pppd(8). Without this option, which is the default, pptpd manages the list of IP addresses for clients and passes the next free address to pppd. With this option, pptpd does not pass an address, and so pppd may use radius or chap-secrets to allocate an address. -v|--version displays the current version of the pptp daemon. FILES
/etc/pptpd.conf /var/run/pptpd.pid DEBUGGING
To turn on debugging, add 'debug' to /etc/pptpd.conf and your PPP options file, and restart pptpd. Typically the PPP options file is options.pptpd in /etc/ppp, though on some distributions it may be pptpd-options. Use your package man- ager to find it, e.g. 'rpm -ql pptpd | grep options' or 'dpkg --listfiles pptpd | grep options'. You may need to configure syslogd to catch debug messages. e.g. edit /etc/syslog.conf and add something similar to the example below, then restart syslogd. # debug logging *.debug;mail.none /var/log/debug This will log all debug information, except mail, to the file /var/log/debug. Note that this is a lot of information and might flood your disks. If performance is an issue, you can try turning off sync during your debugging, by prefixing the destination with '-'. # debug logging *.debug;mail.none -/var/log/debug Disable this line and restart syslog after you are done debugging. See the syslog man pages for more details. 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
pppd(8), pptpd(8), pptpd.conf(5). 29 December 2005 PPTPD(8)
All times are GMT -4. The time now is 08:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy