tunnel tunnel and tunnel :p

The main reason I doing this, because i want to relocating my server to my own lab. Form almost 1 years, I put my server on IARD laboratory. Why? Hahhahaha, because it one network with my router/server. Fyuuuuuuuh. Why so stupid I am T_T. I just realized last day. Thinking about tunnel tunnel and tunnel in bathroom with Marlboro Lights cigarettes.
This is my first network diagram schema, simple, putting my proxy behind my router (read my last tutorial). I using FreeBSD for my own proxy and Internet Router.:

And this is the normal route from my proxy trough internet (as I plan):

and I want my proxy is placed virtually behind my Internet router like this :

Main problem is, how I placed virtually my proxy behind Internet Router with network schema like that? Easy. Tunneling! With tunneling, you can placed a host just like it connecting to the same network. And this is the network diagram I want :

Now lets start our configuration how to create a tunnel between 2 host. I started on Internal Router. Here’s the config :


#ifconfig gif0 create
#ifconfig fig0 tunnel 10.14.200.231 10.14.2.252
#ifconfig gif0 10.10.10.1 10.10.10.2 netmask 255.255.255.252

And this is the config from My own Proxy :

#ifconfig gif0 create
#ifconfig gif0 tunnel 10.14.2.252 10.14.200.231
#ifconfig gif0 10.10.10.2 10.10.10.1 netmask 255.255.255.252

And ofcourse I set default gateway on My own proxy to reach Internet network :

#route add default 10.10.10.1

From Internal router, you should of course NAT-ing ip from My own proxy. You can use PF for NAT-ing IP from tunnel network. Read my last article about vpn server using poptop

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s