Tiny Core Linux
General TC => General TC Talk => Topic started by: Zendrael on September 28, 2013, 08:05:46 AM
-
Hello all!
Attached to this message is a chat of the network that I'm trying to do. I have a router connected to the internet acting as a dhcp server to two machines and to the Nebooting server. The server is connected to the internet by eth0. Running the Terminal Server app, the server start to act like a dhcp server in eth1 to let the clients connect. The terminal server app from Core is configured so the server is the gateway of the clients.
The problem so far:
- clients are booting but not surfing the web
- when the Terminal Server starts, the server also stops surfing the web
- the iptables extension is loaded but the followind is not working to solve this:
$ sudo modprobe iptable_nat
$ sudo echo 1 > /proc/sys/net/ipv4/ip_forward
$ sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
Any suggestions please?
-
Nice, clear picture. Let's start with some obvious details:
0) What version of TC are you using?
1) How are eth0's and eth1's networks configured? IP of each, netmask, etc like the output of 'ifconfig|grep addr'. The output of 'route -n' will also be helpful.
2) Aside from just loading the extension and running the app, have you done any configuration, ie configuring the dhcpd, IP interfaces, etc?
-
Hi genec!
The details are:
0) I'm running (Tiny)Core 4.7.7
1) ifconfig and rout output are attached to this message (as I could not copy/paste at the moment of writing).
2) Aside running the app (Core's Terminal Server) and configuring it as it asks, I did nothing else.
Another point is that, if I do NOT use the iptables instructions, the clients boot ok. When I do that, they stop booting too.
-
$ sudo echo 1 > /proc/sys/net/ipv4/ip_forward
sudo does not affect redirection.
-
Hi tinypoodle!
I did exact the same commands as root (and without sudo, of course) and the scenario keeps the same.
-
I can't understand your drawing, are Machine 01 vs. Terminal 01 & Machine N vs. Terminal N one and the same or not?
-
Hey tinypoodle!
The machines and terminals are different computers. I just enumerate then as like Machine #1, Machine #2, Machine #3, Machine #N because can be in the future more computers attached directly to the dhcp from the router and are not machines that will run Core ( 1 to N or 1 to X... more than one).
The terminals are computers that will boot to the Core Server computer and, as machines, there will be more than one (in fact there are 6 right now, but will be 8 in the future).
The enumeration or quantity itself is not relevant, the problem is just against the server receiving internet from the router dhcp server thru eth0 and acting like a dhcp server to provide netbooting from eth1 and letting the computers netbooted to run surf the web too.
I think my english is not good enought to explain but I hope that you understood.
Thanks!
-
The enumeration or quantity itself is not relevant
What is of relevance is the network topology. ;)
What I don't understand is why you don't keep things simple and route traffic of all machines through the router on a single network, while only activating one NIC on Terminal Server. Is there any specific reason not to do so?
-
Hi Tinypoodle!
The networks are separated because the one with the Terminal Server is a Laboratory for children to learn the basics on computers and we don't want then to mess or to be playing with the network. The other machines on the network (the ones that will not boot to the server) have a intranet system.
-
Hmm, so I got a bit confused following this thread, mainly due to the topic set.
Do I understand correctly that Terminal Server works for you as expected, while your real issue is about turning the same Core box which coincidentally serves for netbooting into a router?
-
Hi tinypoodle!
Yes! The real issue is to get the Server and the clients to surf the web.
While I don't start the terminal server app on the server, it surfs ok. When I start it, it stops to surf. The clients boot ok but they don't surf the web either.
I'm trying to get all of then online (the other computers directly connected to the router already are ok).
-
You can also think like this:
- The server gets and dynamic ip (and internet) trought DHCP in the eth0 interface
- The server must use the eth1 interface to the Terminal Server app
- the clients, will connect thru a switch or hub to the eth1 interface of the server
- the server and the clients must surf the web.
-
And how do all other interfaces get an IP assigned?
-
All computers connected to the router get their IP's from the router DHCP. The same with the eth0 in the server.
The eth1 will only be used to provide the DHCP to the clients that will netboot to the server.
-
The computers that will not boot to the Core Server are running other Linux distros or windows or FreeBSD and the DHCP of the router is necessary because some people connect their cellphones or tablets either.
-
You still have not provided info of how eth1 gets an IP assigned.
-
eth1 is configured throught Terminal Server app provided by Core. :)
-
I highly doubt that the app would configure the interface.
-
You should always use static IPs for a server. Tinypoodle is also right that the terminal server app does not configure your NIC, it should have an IP before starting the wizard.
-
I actually tested in the meantime with "base norestore" and terminal server configuration procedure exits with error as soon as entering an interface which has no IP.
-
Ok, my mistake here...
My testing environment is a VirtualBox Server and clients, the server with 2 ethernet interfaces. My mistake here is that I was letting virtualbox setup the eth1 here with another DHCP from an internal (virtual) network...
Now, disabling this VrtualBox dhcp but maintaining the virtual network, the eth1 interface is gets an ip that I reconfigure like this:
$ sudo ifconfig eth1 192.168.56.101 netmask 255.255.255.0 up
The server is surfing the web after Terminal Server has started now (thanks), only the clients are still not surfing...
-
This thread turns out to be a moving target, having little to do with topic and only in Reply #20 you even mention that it is all about virtualization when it is posted under a different subforum instead...
Besides from what curaga already stated in Reply #20, running a dhcp client for more than one interface could lead to unpredictable results.
-
Hi Tinypoodle!
Do you think it's better to close this thread and start a new one?
The virtual environment is just because I can not always go to the real computers to test it... so while I'm not there I keep trying to solve the problem within the virtual env.
-
IMHO best to start a distinct topic wrt virtualization under according subforum.