VPN + Virtual NIC?

Don´t be shy, Linux is fun! =)
Post Reply
User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

VPN + Virtual NIC?

Post by ayu »

I am setting up a VPN on my server to protect some services from outside view. But I don't want to use the "real" network so to speak, so I want to create a new virtual NIC of some sort, like eth1 and then assign a new unique subnet to that one and have the VPN going on that one instead (Like hamachi).

Problem is that I don't know how to add a virtual NIC like this ^^

Anyone have a clue? =)
"The best place to hide a tree, is in a forest"

User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
19
Location: In your eye floaters.
Contact:

Post by bad_brain »

hm, the easiest way should be creating an interface (as usual), and then adjusting the route to the virtual iface:
http://linux.die.net/man/8/route

:wink:

User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

Post by ayu »

hmm, so how do I add a virtual interface then? ^^
"The best place to hide a tree, is in a forest"

User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
19
Location: In your eye floaters.
Contact:

Post by bad_brain »

same way as a regular one, via ifconfig (to make it permanent via /etc/network/interfaces), then you create a route which pipes the traffic through the real NIC to the virtual one...

Post Reply