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

NAME
radius.so - RADIUS authentication plugin for pppd(8) SYNOPSIS
pppd [ options ] plugin radius.so DESCRIPTION
The RADIUS plugin for pppd permits pppd to perform PAP, CHAP, MS-CHAP and MS-CHAPv2 authentication against a RADIUS server instead of the usual /etc/ppp/pap-secrets and /etc/ppp/chap-secrets files. The RADIUS plugin is built on a library called radiusclient which has its own configuration files (usually in /etc/radiusclient), consult those files for more information on configuring the RADIUS plugin OPTIONS
The RADIUS plugin introduces one additional pppd option: radius-config-file filename The file filename is taken as the radiusclient configuration file. If this option is not used, then the plugin uses /etc/radiusclient/radiusclient.conf as the configuration file. avpair attribute=value Adds an Attribute-Value pair to be passed on to the RADIUS server on each request. map-to-ifname Sets Radius NAS-Port attribute to number equal to interface name (Default) map-to-ttyname Sets Radius NAS-Port attribute value via libradiusclient library USAGE
To use the plugin, simply supply the plugin radius.so option to pppd, and edit /etc/radiusclient/radiusclient.conf appropriately. If you use the RADIUS plugin, the normal pppd authentication schemes (login, checking the /etc/ppp/*-secrets files) are skipped. The RADIUS server should assign an IP address to the peer using the RADIUS Framed-IP-Address attribute. SEE ALSO
pppd(8) pppd-radattr(8) AUTHOR
David F. Skoll <dfs@roaringpenguin.com> PPPD-RADIUS(8)
All times are GMT -4. The time now is 08:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy