Red Hat Configuration - Newbies looks for help...

This is Interesting: Free IT Magazines  
Home > Archive > Red Hat Configuration > January 2004 > Newbies looks for help...





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Newbies looks for help...
IO

2004-01-23, 7:24 pm

Hi all!

I'm trying to configure network on my PC.
It is connected between our ossice router and our office firewall, because
the purpose is to have a machine with a pubblic IP to use for ftp transfert
and as a small web server.

I'm sure to have correct ip for the machine, DNS, and gateway, but after
installation this machine is not visible from other ones.

A tech guy of our ISP told me that I won't need to configure in eth0 conf
file NETWORK and BROADCAST, so I manually removed from that file and
restarted the network, but it still not work.

Did anyone of you got the same problem and find out a solution?

Thank you all!

Enrico


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.521 / Virus Database: 319 - Release Date: 09/23/2003


Dave Griffiths

2004-01-23, 7:25 pm

On Thu, 09 Oct 2003 09:21:40 +0200, IO wrote:

I take it from your post that your PC will do the nats translation. if you
want the Linux box to have the Public IP then it will need to do the nats
translation.

Here is a post I put out earlier, just go down the items as a check list,
might help, might not.

My Lan is on eth0 and the internet is on eth1. Sustitute your
configuration.

First you need to set net.ipv4.ip_forward = 1 in /etc/sysctl.conf (by
default it is set to 0) do this with a text editor like vi make sure you
have "su" privelidges. Then save the file.

Second edit/etc/sysconfig/network

NETWORKING=yes
HOSTNAME=localhost.localdomain
#DOMAINNAME=
#GATEWAY=
GATEWAYDEV=eth1

Save the file

----------------------------- cut here ------------------------- #!/bin/sh

# NAT and IP FORWARDing ...

cd /sbin

#iptables setup

#Delete and flush. Default table is "filter". Others like "nat" must be
#explicitly stated.

iptables --flush
iptables --table nat --flush
iptables --delete-chain

#Set up up forwarding and NATS
# the next two lines are all on the same line
iptables --table nat --append POSTROUTING --out-interface eth1 -j
SNAT --to-source xxx.xxx.xxx.xxx (your public IP)
iptables --append FORWARD --in-interface eth0 -j ACCEPT

----------------------------- cut here ------------------------

cd /sbin
../iptables -L
this will show you the iptables.

Backup you old iptables
cp /etc/sysconfig/iptables /etc/sysconfig/iptables.old

save the new iptables to file
../iptables-save > /etc/sysconfig/iptables

Then either restart the computer or

/etc/init.d/network restart
/etc/init.d/iptables restart

If you want the Lan computers to get DNS information from your box the
start "named" and set the flag so it starts each time you restart.

Have fun...... remember there is no security here at all.

--
Have fun
DaveG
--- Remove the .nospam to email ---

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com