Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gentoo server up and running - IP_Forwarding help needed!!!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Eum-Spliffum
n00b
n00b


Joined: 07 Aug 2003
Posts: 47

PostPosted: Tue Aug 26, 2003 12:08 am    Post subject: Gentoo server up and running - IP_Forwarding help needed!!! Reply with quote

As the title states, my gentoo box is running. I'm able to remotely configure the machine and I have access to SAMBA. Obviously, I have internet capabilities on my linux box, but I have nothing on any of my workstations. I've gone through the threads, I've done the reading but there are still a few issues that need clarification.

I'd like to note that this is my first time with all this nonsense. ;) I've never PuTTy'd in my own server before, I've never used a text-based browser before, I've never coded a router before... so just bare with me folks. I've gotten this far, now lets bring it home.

First thing, I need some light shed on 'ip_forwardin'g and 'net'. Secondly, I'm unsure about my default hostname/gateway, etc... thanks in advance.
_________________
--m0ses
Back to top
View user's profile Send private message
bmichaelsen
Veteran
Veteran


Joined: 17 Nov 2002
Posts: 1277
Location: Hamburg, Germany

PostPosted: Tue Aug 26, 2003 12:27 am    Post subject: Reply with quote

That gotta be a job for iptables. Think up some fine firewall rules for the box.
After that read Chapter 4.1 of this HOWTO and include it in your iptables script. Hope this helps .... 8O
Back to top
View user's profile Send private message
Eum-Spliffum
n00b
n00b


Joined: 07 Aug 2003
Posts: 47

PostPosted: Tue Aug 26, 2003 12:42 am    Post subject: Reply with quote

I wish it were THAT simple. I'm looking for more than just direction. I'm not sure if you read that I was a "noob" or not... ;)

I've found a few IPTABLES arguments but when entered, are they saved? I'm not talking about entering a file, rather than from the prompt.

I don't need a hefty firewall or anything fancy, I'll expound later.
Before I forget, again, my cable modem in on eth1, that's correct right? I tried it both ways and this was the only way it worked.

And, bmichaelsen, not to be rude, but please dont ever reply to any of my threads with that bullsh*t again. It helped me ZERO. I asked several other questions in my initial post that you disregarded as well. Thanks.
_________________
--m0ses
Back to top
View user's profile Send private message
bmichaelsen
Veteran
Veteran


Joined: 17 Nov 2002
Posts: 1277
Location: Hamburg, Germany

PostPosted: Tue Aug 26, 2003 11:08 am    Post subject: Reply with quote

Quote:
I've found a few IPTABLES arguments but when entered, are they saved?

Yep. The kernel remembers them. type
Code:
iptables -L
to see the active ruleset. /etc/init.d/iptables should save and restore the rulesset between boots.
Quote:
Before I forget, again, my cable modem in on eth1, that's correct right?

I dont know, but
Code:
ifconfig
will let you know....

For your other questions:

Quote:
First thing, I need some light shed on 'ip_forwardin'g and 'net'.

Thats a HUGE topic. Please discribe your setup in brief and what you want to do.
Quote:
Secondly, I'm unsure about my default hostname/gateway, etc...

You are free to choose your hostname, if you are not a Server on the Internet (like www-Server or ftp-Server) There is even a thread about this topic. The best idea was to name the machine in the local network after the chemical element corrosponding to the last number of the ip. E.g.
Helium 192.168.1.2
The domain should be anything NOT on the internet. SuSE chooses linux as hostname and local as domain.
The gateway is the machine who know how to get the ip-packets to its destination. E.g. you have a DSL-router installed - the router is the one with connection to the internet, so he is the gateway. If olny one machine is connected to the internet - it is your gateway. It may be more complicated if you have multiple LANs connected, but for an simple setup it that easy: gateway is the machine with connection to the internet.

Quote:
And, bmichaelsen, not to be rude, .... I asked several other questions in my initial post that you disregarded as well. Thanks.

Ho ho, keep calm .... and be more specific about what exactly you need to know ... after all we are just volunteers here ...
Back to top
View user's profile Send private message
Eum-Spliffum
n00b
n00b


Joined: 07 Aug 2003
Posts: 47

PostPosted: Tue Aug 26, 2003 5:28 pm    Post subject: Reply with quote

bmichaelsen, thank you for taking the time with that post and pardon me about last night--I've was stretched pretty thin last night after pulling my hair out with this box.

------
Current Setup
Code:
DHCP Cable Modem ---->>> Eth1 - Gentoo Box - Eth0 ---->>> 16-port hub

From there I branch off into my several workstations.

Goal
Run a gentoo router/workstation. The system config on my gentoo box is up about 100% aside from the iptables configuration (I do believe).

As I mentioned, I got to the point where I could PuTTy/telnet into my gentoo router from any of my workstations and access Samba. Although this box is a
Code:
PIII 550, 128MB RAM, 80GB HDD
file transfers were pretty dang slow... only 'bout 1MB/sec--my buddies server runs constant 6,7,8MB/sec. :(

Questions???
Default Gateway (on my workstations) would be 127.0.0.1??
For the IP Tables, I just need a very basic command set, could someone please provide? I will expand on that later I just want network-wide internet at this point.
_________________
--m0ses
Back to top
View user's profile Send private message
rwallace
Tux's lil' helper
Tux's lil' helper


Joined: 22 May 2003
Posts: 107
Location: Phoenix, AZ US

PostPosted: Tue Aug 26, 2003 6:51 pm    Post subject: Reply with quote

D'oh. company proxy server is not running quite right. The corrected post is below. Sorry :oops:

Last edited by rwallace on Tue Aug 26, 2003 6:56 pm; edited 1 time in total
Back to top
View user's profile Send private message
rwallace
Tux's lil' helper
Tux's lil' helper


Joined: 22 May 2003
Posts: 107
Location: Phoenix, AZ US

PostPosted: Tue Aug 26, 2003 6:55 pm    Post subject: Reply with quote

Check out this site for really good information on firewalls as well as a script that can do just about anything: http://www.projectfiles.com/firewall

With the setup you described, the most basic thing to do would be to use the following rule:
Code:
iptables --table nat --append POSTROUTING --out-interface eth1 --jump MASQUERADE


That will enable Network Address Translation (NAT) on the external interface. Once that is done set the gateway on the workstations to be the internal IP address of the linux box and they should all have internet access.

If things don't work quite right, a few things to check would be:
1) The proper modules are compiled (they should be automatically loaded when you run the iptables command). You'll need
Network Options -->Network packet filtering
--> IP: Netfilter Configuration --> (I usually compile everything here as a module cause I never know what I might want to play with)
2) Can the workstations ping the linux box?
3) Do the workstations have valid DNS entries?
Back to top
View user's profile Send private message
Eum-Spliffum
n00b
n00b


Joined: 07 Aug 2003
Posts: 47

PostPosted: Tue Aug 26, 2003 7:08 pm    Post subject: Reply with quote

Awesome, after a decent night sleep I've gone over the documention AGAIN :( and I do believe we will have liftoff.

I do have one concern though, I ran a few iptables commands last night but when I checked the conf they were not there, even after reboot.

Secondly, I have eth0 and eth1 correct? in eth1 and out eth0?
_________________
--m0ses
Back to top
View user's profile Send private message
revresxunil
Tux's lil' helper
Tux's lil' helper


Joined: 29 Sep 2002
Posts: 129
Location: UW Madison

PostPosted: Tue Aug 26, 2003 7:59 pm    Post subject: Reply with quote

In and out depends on where you are putting what.... Put internet in eth0, eth0 becomes in. Eth1 is on the network switch, that makes eth1 out.
Back to top
View user's profile Send private message
GentooBox
Veteran
Veteran


Joined: 22 Jun 2003
Posts: 1168
Location: Denmark

PostPosted: Tue Aug 26, 2003 8:16 pm    Post subject: Reply with quote

eth1 and eth0 is not something common to all linux boxes.

try:

Code:

dmesg |grep eth


and then there is a list of NIC´s that you have in your computer.
looks like this:

eth0: Realtek something 100 Mbit bla bla
eth1: 3Com ultra over-super 29913 gb NIC

-

and i recall that after you reboot, then all your iptables settings is gone.
that cuz you have to save them.

to do that type:

Code:

iptables-save


after you typed in your iptables rules.
_________________
Encrypt, lock up everything and duct tape the rest
Back to top
View user's profile Send private message
bmichaelsen
Veteran
Veteran


Joined: 17 Nov 2002
Posts: 1277
Location: Hamburg, Germany

PostPosted: Tue Aug 26, 2003 8:25 pm    Post subject: Reply with quote

Eum-Spliffum wrote:

I do have one concern though, I ran a few iptables commands last night but when I checked the conf they were not there, even after reboot.

...
Quote:
to do that type:

Code:

iptables-save



or you do a
Code:
rc-update add iptables default

to activate the init-script that takes care of that takes care of that
PS. this might be interesting https://forums.gentoo.org/viewtopic.php?t=77051&highlight=
Back to top
View user's profile Send private message
GentooBox
Veteran
Veteran


Joined: 22 Jun 2003
Posts: 1168
Location: Denmark

PostPosted: Tue Aug 26, 2003 8:40 pm    Post subject: Reply with quote

Quote:

PS. this might be interesting https://forums.gentoo.org/viewtopic.php?t=77051&highlight=


Yes... and i would be happy if someone answered on my simpel questions :)

i have an idea how it works.
but i need somone to confirm it.
_________________
Encrypt, lock up everything and duct tape the rest
Back to top
View user's profile Send private message
Eum-Spliffum
n00b
n00b


Joined: 07 Aug 2003
Posts: 47

PostPosted: Wed Aug 27, 2003 2:52 am    Post subject: Reply with quote

ok fellas...

I got my first workstation up and running through my gentoo router!!!! 8O 8O 8O

Now, I'm in a bit of a pickle. When trying to setup #2 workstation (which we'll call 'wildman') I can't get it to see the router (gentoo box).

The setup is identical to workstation #1 (moses), 'cept for the ip address (of course). ;) I think I may have a faulty hub but I'm unsure at this point. One of the connections (tp16 - moses) works fine, apparently, but I cant seem to get a connection on any of the other ones... howver, this same hub was just recently removed from a 10-client LAN where it was working fine so I do not know.

To my point: I'd like to thank you guys for helping me thus far. It feels good to have an operational gentoo (Linux) server. I'm just awaiting for the final push away from MS (for good).
_________________
--m0ses
Back to top
View user's profile Send private message
delta407
Bodhisattva
Bodhisattva


Joined: 23 Apr 2002
Posts: 2876
Location: Chicago, IL

PostPosted: Wed Aug 27, 2003 2:56 am    Post subject: Reply with quote

Eum-Spliffum wrote:
Now, I'm in a bit of a pickle. When trying to setup #2 workstation (which we'll call 'wildman') I can't get it to see the router (gentoo box).
What do you mean by "see"?
_________________
I don't believe in witty sigs.
Back to top
View user's profile Send private message
Eum-Spliffum
n00b
n00b


Joined: 07 Aug 2003
Posts: 47

PostPosted: Wed Aug 27, 2003 3:03 am    Post subject: Reply with quote

Note: I fixed the problem... slight hardware problem--PROBLEM SOLVED.

Thanks again fellas.
_________________
--m0ses
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum