I have set up a simple P2P network between my desktop PC (running Debian 7) and my home server (running CentOS 6.5). I am able to ping between the two systems, and they connected via a wired Ethernet cable. The desktop PC connects to a normal LAN via a wireless NIC to a wireless router (which in turn is connected to the Internet).

My problem is that I want the server to be able to access the Internet for upgrades etc. However, when I try to go on the Internet using a browser the domain name can't be found, and pinging www.google.com gives the error Destination host unreachable.

What can I configure on the Debian machine to allow the server to access the internet?


You need to enable ipv4 traffic forwarding on the debian machine as root :

echo 1 > /proc/sys/net/ipv4/ip_forward (note this does not survive reboots)

Then you need a route on your internet router for the subnet between debian and centos. This route should point to the ip address of the wifi interface of the debian.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.