LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-01-2002, 04:37 AM   #1
threadhead
LQ Newbie
 
Registered: Nov 2002
Location: europe
Distribution: slackware 8.1
Posts: 24

Rep: Reputation: 15
network config files


hi you.

im using slackware 8.1 for my gateway at home.
before that i was using redhat and used the files in /etc/sysconfig/ to configure options like ipforward and ipfragmentation.

but i cannot find these files on my slackware host. thats because of BSD style slackware uses.
i hope anyone of you knows where to find these configuration files for slackware.

any help would be appreciated. thanks
 
Old 12-01-2002, 02:25 PM   #2
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 48
They mostly live in the virtual directory /proc/sys/net/ipv4/~

If you want to make any settings permanent, add them to /etc/sysctl.conf

eg
echo 1 > /proc/sys/net/ipv4/ip_forward
turns ip_forwarding on for ALL interfaces

proc.sys.net.ipv4.ip_forward = 1
is done in the /etc/sysctl.conf file

Most of these are done via startup scripts for interfaces, firewalls etc...
http://iptables-tutorial.frozentux.n.../ip-sysctl.txt is a brief explanation of them.

Last edited by peter_robb; 12-01-2002 at 02:30 PM.
 
Old 12-01-2002, 03:02 PM   #3
threadhead
LQ Newbie
 
Registered: Nov 2002
Location: europe
Distribution: slackware 8.1
Posts: 24

Original Poster
Rep: Reputation: 15
i dont think there exists a file called /etc/sysctl.conf either on my system.



is it enough to create this file and put it somewhere in the bootscript?

thank you
 
Old 12-01-2002, 03:10 PM   #4
moses
Senior Member
 
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 50
/etc/rc.d
 
Old 12-01-2002, 04:27 PM   #5
Ciccio
Member
 
Registered: Nov 2002
Location: Paraguay
Distribution: Mandrake 10
Posts: 573

Rep: Reputation: 30
/etc/rc.d/rc.local is where I put that kind of lines (echo # /proc/sys/net/ipv4/whateve_to_modify)
 
Old 12-02-2002, 08:02 AM   #6
threadhead
LQ Newbie
 
Registered: Nov 2002
Location: europe
Distribution: slackware 8.1
Posts: 24

Original Poster
Rep: Reputation: 15
i will try this out...maybe this fixes my problems
 
Old 12-02-2002, 08:32 AM   #7
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
actually ip forwarding is turned on by default on every slackware installation unless you refused to install start up scripts, more details are in /etc/rc.d/rc.inet* (there are two files rc.inet1 and rc.inet2 and I am a bit short on memory which one has the magic echo statement), so everything else can go there as well.
 
Old 12-02-2002, 11:32 AM   #8
Ciccio
Member
 
Registered: Nov 2002
Location: Paraguay
Distribution: Mandrake 10
Posts: 573

Rep: Reputation: 30
Sorry, I use Mandrake and Red H@
 
Old 12-02-2002, 12:07 PM   #9
jamesmwlv
LQ Newbie
 
Registered: Dec 2002
Posts: 5

Rep: Reputation: 0
Additional Question

I have a working system that does IP Masquerading and it has been running fine for a while (RH7.2), the problem is, I cannot remember where i put the "Magic IP to turn up ip forwarding. What I want to know, is their a "find" method to search the contents of files for a paticular sring of text?

Thanks,
james Wadkins
james@vtat.com
 
Old 12-02-2002, 01:36 PM   #10
threadhead
LQ Newbie
 
Registered: Nov 2002
Location: europe
Distribution: slackware 8.1
Posts: 24

Original Poster
Rep: Reputation: 15
yes of course there is.

you have to use the command grep.

i guess its syntax due to this use is:

Code:
grep / <stringoftext>
this searches every folder for the specified text.
if this doesnt work, go for
Code:
man grep
or
grep --help
 
Old 12-02-2002, 03:36 PM   #11
jamesmwlv
LQ Newbie
 
Registered: Dec 2002
Posts: 5

Rep: Reputation: 0
Tried your advise and no luck. Looked at the hrlp file for grep and tried a few other things will not luck.
Thanks,
James Wadkins
james@vtat.com
 
Old 12-02-2002, 06:19 PM   #12
Ciccio
Member
 
Registered: Nov 2002
Location: Paraguay
Distribution: Mandrake 10
Posts: 573

Rep: Reputation: 30
Ok, then try using the FSH standard... Check /etc /proc/sys/net/ipv4/~ /home/~ /root
 
Old 12-05-2002, 09:12 AM   #13
threadhead
LQ Newbie
 
Registered: Nov 2002
Location: europe
Distribution: slackware 8.1
Posts: 24

Original Poster
Rep: Reputation: 15
finally i installed slackware 8.1 again to ensure that there was no error during the installtion.

as usual i can ping my external interface IP when online.
i added the nameservers in the /etc/resolv.conf file and wrote iptables rules for my external interface(eth1).
Code:
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A INPUT -i eth0 -m state --state NEW,INVALID -j DROP
iptables -A FORWARD -i eth0 -m state --state NEW,INVALID -j DROP
echo 1 > /proc/sys/net/ipv4/ip_forward
when i try to use lynx with my client ie like
lynx linuxquestions.org
a message like:looking up url first
but when i try to lynx an IPaddress
a message like:making http connection to site
but nothing happens.

where is my problem?
is it maybe the client, or are the firewall rules not written correct?

please help me
 
Old 12-05-2002, 06:18 PM   #14
Ciccio
Member
 
Registered: Nov 2002
Location: Paraguay
Distribution: Mandrake 10
Posts: 573

Rep: Reputation: 30
Try with Konqueror or Mozila
 
Old 12-05-2002, 10:26 PM   #15
moses
Senior Member
 
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 50
Re: Additional Question

Quote:
Originally posted by jamesmwlv
I have a working system that does IP Masquerading and it has been running fine for a while (RH7.2), the problem is, I cannot remember where i put the "Magic IP to turn up ip forwarding. What I want to know, is their a "find" method to search the contents of files for a paticular sring of text?
I think what you need is in /etc/init.d, but I'm not sure about the RH
setup. It'll be somewhere under the /etc directory.
Code:
cd /etc/
grep -r "string you want to find" *

This searches every file under /etc for "string you want to find"



A portion of my firewall code:

Code:
echo "   clearing any existing rules and setting default policy.."
$IPTABLES -P INPUT ACCEPT
$IPTABLES -F INPUT 
$IPTABLES -P OUTPUT ACCEPT
$IPTABLES -F OUTPUT 
$IPTABLES -P FORWARD DROP
$IPTABLES -F FORWARD 
$IPTABLES -t nat -F

echo "   FWD: Allow all connections OUT and only existing and related ones IN"
$IPTABLES -A FORWARD -i $EXTIF -o $INTIF -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPTABLES -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT
$IPTABLES -A FORWARD -j LOG

echo "   Enabling SNAT (MASQUERADE) functionality on $EXTIF"
$IPTABLES -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE

Last edited by moses; 12-05-2002 at 10:27 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Webmin cannot handle Samba config files that use the config or include directives allelopath Linux - Networking 3 01-18-2005 09:36 AM
SUSE - where are the network config files ? maxut Linux - Networking 2 09-14-2004 08:56 AM
question on config files vs build files working2hard Programming 2 07-29-2004 11:45 AM
possible samba config problem or network config issue? rruffin Linux - Networking 3 06-03-2003 04:04 PM
linking network config files trodak Linux - Networking 6 09-06-2002 06:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration