Routed network configuration advice

P

postcd

Guest
Hello,

i want to ask how i need to set proper routed configuration of a network, do i need to add real IP values, i got an example routed configuration, but im not sure how i need to tweak my present one, just want to ask if anyone there has time to advice me proper config? :cool: here is present vs adviced config o_O: http://pastebin.com/p3um3Px3
thx
 


I'm not sure what exactly you're trying to do, but I'm willing to guess.

If you have a typical home network with an Internet connection and a router provided by your ISP the the usual setup is your computers are on a private network let say 192.168.x.x and the router has an internal address of 192.168.x.1. Then you have 2 choices, DHCP (Dynamic Host Configuration Protocol) would be the easiest, or you can assign static IP addresses.

If this computer is going act as a server of some kind or you want to log in from another computer you probably want a static IP. On the other hand if this is just a workstation and you want to "plug and play" DHCP is the easiest.

Most Linux distribution will default to DHCP and most home routers default to act as a DHCP service. So if you just plug it into your home network it probably will work. However if you are using a wireless interface on this guy, and it doesn't just work. I would be more suspect of the drivers for the wireless card.

Please tell us what your set up looks like, which distro you installed and what the problem is. This keeps guys like me from spouting technobabble generalities.

Best,
Joe
 
The issue was like this:
The dedicated server located in remote datacenter. has its own 1 IPv4. And i installed an VPS on this server and got additional single IPv4 (no broadcast, no gateway IP, just signle one) and i wanted to use it for my VPS... BUT i was unable to connect to the internet from VPS. So i wanted to setup routed network configuration on my main host server, so it allows the VPS to somehow connect into internet. That was it. Server had Debian OS.
 
And i installed an VPS on this server and got additional single IPv4 (no broadcast, no gateway IP, just signle one)
I think your hoster gave you the additional IP to use on your dedicated server, in the same network. So, the netmask, broadcast address and gateway will be the same.

There are two methods to use the additional IP inside your VPS:

1. Connect the virtual network of your VPS to the main network of your dedicated server via a bridge. The bridge works like a small Ethernet switch and allow you to build a common network for your VPS, your dedicated server and your provider.

2. Make a little trick with routed network.
On the VPS:
- Configure it to use private IP addresses (like 192.168.*.*/24) and make sure it is available from your dedicated server
- Add the additional IPv4 as a secondary IP address with netmask /32

On the dedicated server:
- Enable proxy_arp feature on the main network interface connected to hoster (via sysctl)
- Add the static route to the additional IPv4 via private IP of your VPS
- Enable packet forwarding (via sysctl)

The second method is more complicated. Possibly you will need to adjust your software inside your VPS to use the secondary IPv4 instead of the main IP 192.168.?.?.
 
What does "ifconfig -a" and "netstat -rn" report when you are connected?

Vitalka's solution would work but there may be a much simpler solution.

If your home network is on a different subnet from the data center machine you may be able to do what you want with dedicated routes.

The data center machine obviously has Internet access and your home machine does too. If the problem is your home machine doesn't have Internet access while connected you could route it through the data center, maybe a bit slower but easy.

If you end up with 2 subnets on the home machine, you could route only the VPN private addresses to the data center and everything else through your home router.

Joe
 

Staff online


Latest posts

Top