LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   redirect all internet traffic to another server using gre tunnel (https://www.linuxquestions.org/questions/linux-networking-3/redirect-all-internet-traffic-to-another-server-using-gre-tunnel-4175411686/)

Night_Fall 06-15-2012 05:16 PM

redirect all internet traffic to another server using gre tunnel
 
Hi everyone, first thanks for this great forum. I learned a lot here and just reading solved a lot of problems I had with networking.

Ok so I have a problem with gre tunnels wich is not working the way I want.

Ok so I want to take all internet traffic from a dedicated I have and forward it to another server I have.

SERVER A:
eth0 => 69.195.147.2
eth0:1 => 69.195.147.3

SERVER B:
eth0 => 64.79.86.82


I want to send all traffic coming into 69.195.147.3 to SERVER B and be able to use this ip on server B to bind services.

So I added a gre tunnel between those two servers:

SERVER A:
iptunnel add tunX mode gre remote 64.79.86.82 local 69.195.147.2 ttl 225
ifconfig tunX 10.0.201.1/24
ifconfig tunX up

SERVER B:
iptunnel add tunX mode gre remote 69.195.147.2 local 64.79.86.82 ttl 225
ifconfig tunX 10.0.201.2/24
ifconfig tunX up
ip add add 69.195.147.3 dev eth0

Great so I can ping the SERVER B from SERVER A and vice versa

But the thing I tried with routes after is that all traffic coming to 69.195.147.3 goes into tunnel and all services on the SERVER B are reachable when I connect to 69.195.147.3 (ssh / http / etc)

Can someone help me please this I'm trying to get rid of this problem for 2 days now.

Thanks a lot


All times are GMT -5. The time now is 09:52 AM.