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
ntp.conf(5)							File Formats Manual						       ntp.conf(5)

Name
       ntp.conf - Network Time Protocol configuration file

Description
       The  file  is the configuration file for the Network Time Protocol (NTP) daemon, This file must be configured on your system before running
       Any host names that you specify in the file must have an entry in the file, or an entry in the master database, if the  database  is  being
       served to your system by BIND/Hesiod or Yellow Pages.

       The file has four entry formats:

       trusting no
	    This entry guarantees that your system synchronizes only to the NTP servers identified in the peer and server entries specified.  Dig-
	    ital recommends that all systems include the entry.

       peer server
	    This entry identifies server as one of the NTP servers that your system trusts, and from which your system will accept  time  synchro-
	    nization.	 Your  system  may  also  provide time synchronization to this server.	Servers can be identified by host name or internet
	    address.

	    NTP servers should be configured with entries.

       server server
	    This entry identifies server as one of the NTP servers that your system trusts, and from which your system will accept  time  synchro-
	    nization.	Your  system  can  not	provide  time  synchronization to this server.	Servers can be identified by host name or internet
	    address.

	    NTP clients should be configured with entries.

       peer   /dev/null       LOCL    1       -5      local
	    This entry identifies your system as a local reference clock.  A local reference clock is the most accurate system clock available	at
	    your  site.   If you receive time synchronization from the Internet NTP service, you should not include this entry on any of your sys-
	    tems.  At most, one system in a set of nodes running should be identified as a local reference clock.

	    A host which specifies this entry should not specify any or entries.

Examples
       This is a sample configuration file for an NTP client which receives time synchronization from the NTP servers: and Lines beginning with  a
       number sign (#) are comments.
       #
       #	       NTP  Configuration File
       #	This file is mandatory for the ntpd daemon
       #
       #
       #
       #   **  A L L  **
       #
       #  "trusting no" prevents this host from synchronizing
       #   to any host that is not listed below.  It is recommended
       #   that all hosts include the line "trusting no".
       #
       trusting no
       #
       #
       #    **	S E R V E R  **
       #
       #  If you are configuring a server, use "peer" entries to
       #  synchronize to other NTP servers.  For example, server1,
       #  server2, and server3.
       #
       #peer	      server1
       #peer	      server2
       #peer	      server3
       #
       #
       #
       #
       #    **	C L I E N T  **
       #
       #  If you are configuring a client, use "server" entries to
       #  synchronize to NTP servers.  For example, server1, server2,
       #  and server3.
       #
       server	      server1
       server	      server2
       server	      server3
       #
       #
       #
       #    **	L O C A L   R E F E R E N C E	C L O C K  **
       #
       #  If you are configuring a local reference clock, include the
       #  following entry and the "trusting no" entry ONLY.
       #
       #peer	 /dev/null LOCL 1    -5   local
       #

See Also
       ntp(1), ntpd(8), ntpdc(8)
       RFC 1129--Internet time synchronization:  The Network Time Protocol
       Introduction to Networking and Distributed System Services

																       ntp.conf(5)
All times are GMT -4. The time now is 03:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy