1829514 Members
1937 Online
109991 Solutions
New Discussion

Re: cipe routing

 
jon_carev
New Member

cipe routing

Hello. I have the folowing boxes.

Machine A
eth0: $real_ip1
eth1: 192.168.0.1(local network)
cipcb0: 10.0.0.1
/ ||
internet
||
\/
Machine B
eth0: real_ip
cipcb0: 10.0.0.2

I configured cipe for both boxes, and it works. Now i
want to make that all the traffic from machine A to
internet to pass through machine B, and then to go to
internet.

Something like that :if i access www.google.com from
machine A to pass

machineA->internet->machineB->www.google.com
.Something like machine B, to be a virtual gateway of
machine A. Or at least all the trafic from the local
network (192.168.0.1/24) to have this route to
internet. well, the traceroute shoud be like that for
a box from the local network (supposse 192.168.0.3)
192.168.0.3->192.168.0.1->10.0.0.1->10.0.0.2->ip_real2->
internet. Or something like that.
The configuration file otions.cipcb0 for both
macines is something like that
ptpaddr 10.0.0.2
ipaddr 10.0.0.1
me ip_real1:2304
peer ip_real2:2304
key xxxxxxxxxxxxxxxxxxxxxxxxx
Any idea how can i do that? Thanks very much.
3 REPLIES 3
Jerome Henry
Honored Contributor

Re: cipe routing

Hi !

The easiest way should be to set up an Iptables rule on machine A and a proxy on machine B...
More on iptables :
http://www.netfilter.org
On squid :
http://www.squid-cache.org

Ask here if you want more details on configuration.

J
You can lean only on what resists you...
jon_carev
New Member

Re: cipe routing

Well, i want to route all the trafic through tunnel, not only http traffic. I want a routing solution, where my knowledge are missing here. I want the default gateway on machine A to be 10.0.0.2 and to add a iptables masquarade on machine B(
iptables -A POSTROUTING -t nat -s -o eth0 -j MASQUERADE).I tried to make the default route 10.0.0.2 on machine A , and i added a route to ip_real of machine B through the A gateway, but it doesn't work. Can anyone give me a detailed solution ? Thanks
Jerome Henry
Honored Contributor

Re: cipe routing

what about
iptables -t nat - A PREROUTING -i eth0 -j dnat --to-destination 10.0.0.2

You could also set up squid on B, which would also allow you to monitor connections (if you use port 3128, then former command ecom 10.0.0.2:3128).

hth

J
You can lean only on what resists you...