• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

NAT problems with fold-server....HELLLPPPP!!!!

rodsfree

[H]ard|Gawd
Joined
Dec 13, 2004
Messages
1,417
Ok Guys,
I finally started trying to setup and configure unhappy_mage's fold-server this weekend.

I did alright, up until the diskless boxen tries to verify my user ID with the stanford server.

I think that I'm having NAT problems.

What I've got.
* Broadband access is through a Westell DSL Modem, has built in firewall and DHCP server.
* D-Link 8 port 10/100 switch - which is what forms the hub of my small network.
* Fold-Server computer plugs into D-link switch with default IP 198.168.1.15 <if memory serves>
* 2nd NIC on Fold-Server plugs into Linksys 5 port 10/100 switch.
* Diskless boxen plugs into linksys 5 port switch.

What I think is the problem....the boxen isn't recieving data from the Stanford server because my Westell DSL modem thinks that the request came from the Fold-Server and not the boxen.

I'm trying to set up the iptables app listed in u_m's docs, but I keep getting a permission denied everytime I enter the following:
Code:
iptables -t nat -A POSTROUTING -o eth1 -j SNAT --destination 0.0.0.0/0 --to-source 192.168.1.15
Even after I put it in the startup script and rebooted.

BTW u_m....PuTTY doesn't know what this is.
Code:
wget [url]http://fold-server.sf.net/iptables[/url] -O /usr/sbin/iptables
But bash does! :D ///does happy dance for figuring out something in Linux////

So I guess I'm asking if I need to change the permissions on these 2 files and how to do it? :confused:

Thanks

 
1. Does the modem have the capability to setup static routing? eg. any requests for 10.0.0.0 will be routed to ip address 192.168.1.15.

2. Can you access the internet from the fold server?

3. When setting up my farm, I used the config page on the fold server. He might have those files protected so that only those scripts on the fold server web page can edit them.

4. I use the Linksys 5 port switch on my setup also. the fold server connection to the rest of the systems through that could not be hooked up to the uplink port. I think you might need a cross over cable or something for that?

Suggestions. I hope they help.
 
ICE_9 said:
1. Does the modem have the capability to setup static routing? eg. any requests for 10.0.0.0 will be routed to ip address 192.168.1.15.

2. Can you access the internet from the fold server?

3. When setting up my farm, I used the config page on the fold server. He might have those files protected so that only those scripts on the fold server web page can edit them.

4. I use the Linksys 5 port switch on my setup also. the fold server connection to the rest of the systems through that could not be hooked up to the uplink port. I think you might need a cross over cable or something for that?

Suggestions. I hope they help.

Replies in order:

1. No the modem can't set up a static routing....just my luck - Bellsouth POS :(
2. Yeah, I can surf anywhere I want through the dsl login.
3. The config on the web page doesn't even mention these files. u_m's docs mention that he intends to implement NAT in ver 1.1, and here is how to do it if you need it. So I tried and I've failed so far.
4. Yeah I had the same problem....It works great as long as you don't use the uplink port, then nothing talks to each other. I might have to try a crossover cable and see if that will work. Good thing I just bought that cat5 cable kit offa ebay. :D

Thanks for the help ICE....any replies help by just allowing me to vent a little frustration....my head is getting sore! :confused: :eek:

 
Just in case anyone else was wondering about the uplink port on the Linksys 5 port switch.
Here is what they have to say about it in the manual for this switch.

Code:
Uplinking to Other Switches and Hubs
Switches, hubs, and similar network devices are uplinked to your Switch
with straight-through Category 5 cabling. Attach the Category 5 cabling to
the uplink port of the network device that you are uplinking to the Switch,
and plug the other end of the cable into any standard RJ-45 port on your
Switch. Using the uplink port will automatically disable the port directly
next to it, since the uplink port is a shared port.

Note the last sentence...You still only get 5 ports, not the 6 physical plugins.
Bummer
 
who are you logged in as when you try to do that? you may need to be root.

do you have 2 nics in the machine?
 
rogue_jedi said:
who are you logged in as when you try to do that? you may need to be root.

do you have 2 nics in the machine?

Got the 2 NICs - 1 onboard 1 in PCI slot.

I'm logged in as "dsl" and opened a bash window as root. From my understanding of *nix stuff<I'm a n00b> this should allow me to do what I need to do. It let me edit the startup file using u_m's instructions in the fold-server docs.

I can try to do it as root, instead of 'dsl' opening bash as root.

Uh....how do you start X when you log in as root?

Is there a way to change permissions on the files?


 
'startx' will start x. imagine that?

run this for the files it won't let you change:
Code:
ls -lstr <filename>

tab completion is your friend, and this will show the permissions it has set.

chmod and chown let you change permissions/ownership. if foldserver has man you can use that ("man chmod" should do it) but i dunno if it is on there. u_m set it up, i just gave him my opinion on stuff :p

(then he ignored it)
 
Thanks!
I'll give it a try as soon as I get home from work.


rogue_jedi said:
u_m set it up, i just gave him my opinion on stuff :p
(then he ignored it)

What are brothers for?! LOL :D

(I've got one too!....Thank God he isn't into computers! I don't know how you 2 stand it!)


 
we each have our own computers. (2 each) hehe. feel sorry for my little brothers, tho... they have to share the family box (with my mom & dad too)

don't know how they can stand not having access to a computer 24/7...
 
rogue_jedi said:
we each have our own computers. (2 each) hehe. feel sorry for my little brothers, tho... they have to share the family box (with my mom & dad too)

don't know how they can stand not having access to a computer 24/7...

Good God!! :eek:
How many are there of you guys?

Mom & Dad trying for their own IT department!

Thanks Again!


 
unhappy_mage said:
http://fold-server.sourceforge.net/docs.shtml#static-routes-nat

I updated the documentation; I think the problem is probably that you didn't do the last two lines (which I added, doh!). After you do this, everything should be golden.

Oh, and congrats, I think you may be the first user to get this far on your own ;)


Thanks!!! :D

Does this qualify as an official u_m "Whoops!"

The iptables work now....I get the message for them on the boot screen, anyway.

But it broke the PXE boot from the boxen. :(

Does the load order matter?

I'm just guessing here.




 
How far do they get? Load kernel and boot it? Bootup screen? What?

 
unhappy_mage said:
How far do they get? Load kernel and boot it? Bootup screen? What?


Boxen replies with a no DHCP source found message and asks to insert boot media.




 
Ah, okay. Run "ps | grep dnsmasq". There should be a line like this:
119 root 540 S dnsmasq
Nothing matters except that dnsmasq is running. If it isn't, run "dnsmasq" and retry it.

HTH

 
unhappy_mage said:
Ah, okay. Run "ps | grep dnsmasq". There should be a line like this:
119 root 540 S dnsmasq
Nothing matters except that dnsmasq is running. If it isn't, run "dnsmasq" and retry it.

HTH


Did all that.
dnsmasq is working
PXE boot for the boxen is happening now....still don't know what fixed it.
The client comes up and starts...
Still can't verify ID with the primary or secondary Stanford Servers.

Any Ideas?

I'm done for the night...
Thanks for the help guys!!




 
That's odd....

Here are a few things to try.
1) Ping from fold-server to www.google.com
ping google.com
2) Ping from client to 10.1.1.1
ping 10.1.1.1
3) Ping from client to your router (probably 192.168.1.1)
ping 192.168.1.1
4) Lookup google.com on the client
nslookup google.com
5) ping google on client.

Let me know how those go. I'm off to bed too.

 
unhappy_mage said:
That's odd....

Here are a few things to try.
1) Ping from fold-server to www.google.com
ping google.com
2) Ping from client to 10.1.1.1
ping 10.1.1.1
3) Ping from client to your router (probably 192.168.1.1)
ping 192.168.1.1
4) Lookup google.com on the client
nslookup google.com
5) ping google on client.

Let me know how those go. I'm off to bed too.


Didn't see this until I got to work today....
#1 I don't have to do....if I log in as "dsl" I can browse google with firefox - no problem.
In fact I was using firefox to read the fold-server docs while I was setting it up. :D

The others I have to try....
I'm assuming that "Ctrl-C" will halt the fold@home client on the diskless boxen - just like it does on all of the other clients? (win console & 'dsl' console)

I think that #2 will work... the client is netbooting after all.

The only firewall ports that the fold client uses are 80 and 8080 right?
Nah...that couldn't be it because my Windows computer folds fine and the fold-server does too.

Well, this will have to wait until I get off work to try.

Thanks,
And if anyone else has any ideas, please let me know.


 
OK u_m....
Here is what I've tried.....

I can't do anything with, to, or from the client.
Using a keyboard pluged into the client I can't stop the F@H client with "Ctrl C"
I cant issue any commands that it will accept....It'll let me type them on the screen but it doesn't do anything.

I can't stop the client from the web access on the foldserver or any other machine on my network.
It gives a "Host key verification failed." error.

I can ping to the client from the fold server....but that's all.
I can ping the world from the foldserver.
I just can't do anything with the client.


Any Ideas?



 
Run "nano /.ssh/known_hosts" on the server. Remove anything starting with fold-client or 10.3.1. This should fix the "unable to ssh" thing. It'll then ask you a question like this when you run "ssh fold-client345":
Code:
The authenticity of host 'fs (192.168.1.123)' can't be established.
RSA key fingerprint is (lots of hex digits here).
Are you sure you want to continue connecting (yes/no)?
Answer "yes", not just "y".

On the client directly, hit alt-F1 to get to a login prompt. It automatically switches to the fifth console on boot to monitor FAH. Log in as "root", password "Fold@on" like the server.


 
unhappy_mage said:
Run "nano /.ssh/known_hosts" on the server. Remove anything starting with fold-client or 10.3.1. This should fix the "unable to ssh" thing. It'll then ask you a question like this when you run "ssh fold-client345":
Code:
The authenticity of host 'fs (192.168.1.123)' can't be established.
RSA key fingerprint is (lots of hex digits here).
Are you sure you want to continue connecting (yes/no)?
Answer "yes", not just "y".

On the client directly, hit alt-F1 to get to a login prompt. It automatically switches to the fifth console on boot to monitor FAH. Log in as "root", password "Fold@on" like the server.




I fixed the ssh thing.....I had to manually "ssh 10.3.1.185" from bash in the server - that fixed it, before I got your responce...(pats self on back!)

got the login prompt....
I can ping everything inside my network - router, server, other computers outside the foldserver - everything. I just can't get outside, through my router. And that's having to go through the foldserver - and return, to do it
The damn thing is blocking the packets generated by the client, but not those from the foldserver, so it looks like something isn't kosher in the NAT on the foldserver. Or at least kosher enough for the router to let the packets pass outside to the internet.

Looks like I never do things the easy way! :(

bed time



 
Okay, it could be that the NAT got set up incorrectly. Run this on the server:
iptables -t nat -L
and post the whole result here. If you select it in a terminal, and then right-click in the web browser, it should copy/paste it. Here's what I got:
Code:
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination
SNAT       all  --  anywhere             anywhere            to:192.168.1.15

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
It could also be that one of the interfaces is down or something, check "ipconfig" to make sure the address there matches the one given in iptables' output.

 
I'll give it a try...

Didn't do much yesterday, had a Dr.'s appointment, - got a shot and a bunch of scripts - Broncitius<sp?> really sux :(

We'll give it a try this evening.

Thanks!

 
u_m
Here is what I've got
Code:
root@fold-server:~# iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination         

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination         
SNAT       all  --  anywhere             anywhere            to:192.168.1.15 

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         
root@fold-server:~# ipconfig
bash: ipconfig: command not found
root@fold-server:~#

Which is the same thing you have......

What are the ipconfig commands?
I typed "ipconfig" and it didn't recognize it...see above...


But going through the control panel.... the server IP is correct and I can ping it from my client and my Windows PC.


Later
 
unhappy_mage said:
3) Ping from client to your router (probably 192.168.1.1)
ping 192.168.1.1
4) Lookup google.com on the client
nslookup google.com
5) ping google on client.
ping google.com
Let's try these again...

 
unhappy_mage said:
Let's try these again...
Code:
Originally Posted by unhappy_mage
3) Ping from client to your router (probably 192.168.1.1)
ping 192.168.1.1
4) Lookup google.com on the client
nslookup google.com
5) ping google on client.
ping google.com


Tried 'em....here's what happened.

client pings router (192.168.1.254 for me) just fine
nslookup google.com fails.....returns a message that 10.1.1.1 is the server
ping google.com fails .....with name resolution error.

I can ping 4.2.2.2 ( Verizon's DNS servers) just fine.
This tells me that the iptables are working but that the client is relying on the foldserver for DNS lookup functions and that isn't working for some reason.
The DNS calls should pass from the client to the foldserver and then to the router, but this isn't happening.
If the F@H client uses a named server instead of an IP address when it requests anything then the Domain Name isn't being resolved correctly....

Right?

Any Ideas on how to fix this?





 
The fold-server DNS server is set up a little weird. Look for the line like this (ctrl-W in nano):
Code:
no-resolv
and add a # at the beginning. Save & exit. Then run "killall dnsmasq; dnsmasq" to restart it. Then the clients should work fine!

Yep, I'm an idiot. Adding that one line has added quite a few request-for-helps.

 
unhappy_mage said:
The fold-server DNS server is set up a little weird. Look for the line like this (ctrl-W in nano):
Code:
no-resolv
and add a # at the beginning. Save & exit. Then run "killall dnsmasq; dnsmasq" to restart it. Then the clients should work fine!

Yep, I'm an idiot. Adding that one line has added quite a few request-for-helps.



Not to be bugging you again...



But what file should I look for that line in? :eek: :D


:cool:
 
Doh!

That would be /etc/dnsmasq.conf.

Yep, this counts as a whoops.

 
now, forward that https page to the internet and monitor the boxen from a far.

eg. https://www.azfolding.com

or you can just type the ip address to check on it. either or. not recomended for the network unsavy. forwarding, ports, addresses, and ip will confuse you.
 
Back
Top