LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 03-21-2013, 07:27 AM   #1
r00t
LQ Newbie
 
Registered: May 2012
Posts: 23

Rep: Reputation: Disabled
Question GRE alias iface


So I'm trying to tunnel all traffic from server A to server B through GRE. That works fine. But my problem is, that I want to add an alias interface on server B with the external IP from server A to bind services to it and somehow that doesn't work as I'd expect it to. That's what I do:

Server A
---
External IP: 1.2.3.4
Internal GRE IP: 10.10.10.1

Server B
---
External IP: 1.2.3.5
Internal GRE IP: 10.10.10.2

What I do on server A:

Code:
ip tunnel add gre1 mode gre local 1.2.3.4 remote 1.2.3.5 ttl 255
ip addr add 10.10.10.1/30 dev gre1
ip link set gre1 up

iptables -t nat -A POSTROUTING -s 10.10.10.0/30 -j SNAT --to-source 1.2.3.4
iptables -t nat -A PREROUTING -d 1.2.3.4 -j DNAT --to-destination 10.10.10.2
iptables -A FORWARD -d 10.10.10.2 -j ACCEPT
What I do on server B:

Code:
ip tunnel add gre1 mode gre local 1.2.3.5 remote 1.2.3.4 ttl 255
ip addr add dev gre1 10.10.10.2 peer 10.10.10.1/30
ip link set gre1 up

ip addr add 1.2.3.4 dev eth0 label eth0:99
echo "285 blah" >> /etc/iproute2/rt_tables
ip rule add from 1.2.3.4 table blah
ip route add default via 10.10.10.1 dev gre1 table blah
Where do I fail? If I don't add the eth0 label and stick with routing tables for the internal IPs only, it's working fine.
 
Old 04-09-2013, 05:34 PM   #2
r00t
LQ Newbie
 
Registered: May 2012
Posts: 23

Original Poster
Rep: Reputation: Disabled
No one?
 
Old 05-21-2013, 04:11 PM   #3
r00t
LQ Newbie
 
Registered: May 2012
Posts: 23

Original Poster
Rep: Reputation: Disabled
Still looking for a solution.
 
Old 02-17-2014, 06:07 PM   #4
r00t
LQ Newbie
 
Registered: May 2012
Posts: 23

Original Poster
Rep: Reputation: Disabled
Come on, it's impossible that no one knows a solutions to this one here.
 
Old 02-18-2014, 12:40 PM   #5
Lantzvillian
Member
 
Registered: Oct 2007
Location: BC, Canada
Distribution: Fedora, Debian
Posts: 210

Rep: Reputation: 41
It make more sense to use routable subnets
 
Old 02-18-2014, 02:07 PM   #6
r00t
LQ Newbie
 
Registered: May 2012
Posts: 23

Original Poster
Rep: Reputation: Disabled
How would such a setup look like?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] is it deadcode in mac80211/iface.c in .ndo_open mahesh kumar.E Linux - Kernel 1 06-07-2012 05:39 AM
icmp: 224.0.0.5 protocol 89 port 44 unreachable (gre encap) - Error over IPSEC/GRE kayasaman *BSD 5 03-03-2012 01:23 PM
Vpn poptop - CTRL: PTY read or GRE write failed (pty,gre)=(5,6) dezeque Linux - Networking 8 12-11-2009 01:56 PM
12.0 ACPI/Ethernet IFace issues gankoji Slackware 7 05-05-2008 02:38 AM
GRE keepalives. How can a SUSE 9.0 Linux box send GRE keepalives? dlef Linux - Networking 1 06-28-2005 12:00 PM


All times are GMT -5. The time now is 11:28 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration