Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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?
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?
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152
Rep:
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.