Click to See Complete Forum and Search --> : IP Masquerading XP/Cable/2 PCs
Before you aim and fire at me for asking about such a well explored subject just let me say I have searched the Mandrake forums, google.com/linux, and this site and yes I have found many answers. But the answers are part of the problem. Everybody seems to have done this in a different way! Or at least explained it suffciently different enough to lose me. As easy as that is.
I have two machines and I want to share my internet connection with the both of them.
1 with 2 nics that is connected to the cable modem using Mandrake 9.1 and the other PC which is an XP machine with 1 nic. I know I have the right hardware as I had this working successfully with XP.
Help please?
Edited for clarity. Oops. :o
elite_syntax
07-13-2003, 11:44 PM
You lost me what your try to say.:confused:
Initial post edited for clarity. Sorry. :o
This (http://monmotha.mplug.org/firewall/index.php) script does all for me, is for sharing inet. It uses IPtables, that you should have installed in your system.
IP Masquerade HOWTO (http://www.tldp.org/HOWTO/IP-Masquerade-HOWTO/). Incase that you want it :)
je_fro
07-14-2003, 02:21 AM
Use NAT. I use a script similar to this.
#############################################
#!/bin/sh
echo -e "\n\tLoading Firewall Rules"
# Enable forwarding
echo "1" > /proc/sys/net/ipv4/ip_forward
echo "1" > /proc/sys/net/ipv4/ip_dynaddr
echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_all
echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
LAN_IP_NET1='192.168.0.1/24'
#LAN_IP_NET2='192.168.1.1/24'
#LAN_IP_NET3='192.168.2.1/24'
LAN_NIC1='eth1'
#LAN_NIC2='eth2'
#LAN_NIC3='eth3'
WAN_NIC='eth0'
# Flush
iptables -t nat -F POSTROUTING
iptables -t nat -F PREROUTING
iptables -t nat -F OUTPUT
iptables -F
iptables -X
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT
iptables -N port-scan
iptables -A INPUT -i $WAN_NIC -p tcp --tcp-flags \
SYN,ACK,FIN,RST RST -j port-scan
iptables -A port-scan -m limit --limit 1/s --limit-burst 4 -j RETURN
iptables -A port-scan -j LOG --log-prefix "IPTABLES PORT-SCAN:"
iptables -A port-scan -j DROP
iptables -N spoofing
iptables -A INPUT -i $WAN_NIC -s 10.0.0.0/8 -j spoofing
iptables -A INPUT -i $WAN_NIC -s 172.16.0.0/12 -j spoofing
iptables -A INPUT -i $WAN_NIC -s 192.168.0.0/16 -j spoofing
iptables -A INPUT -i $WAN_NIC -s 224.0.0.0/4 -j spoofing
iptables -A INPUT -i $WAN_NIC -s 240.0.0.0/5 -j spoofing
iptables -A INPUT -i $WAN_NIC -d 127.0.0.0/8 -j spoofing
iptables -A spoofing -j LOG --log-prefix "IPTABLES SPOOFING:"
iptables -A spoofing -j DROP
iptables -N bad_tcp_packets
iptables -A bad_tcp_packets -p tcp --tcp-flags SYN,ACK \
SYN,ACK -m state --state NEW -j REJECT --reject-with tcp-reset
iptables -A bad_tcp_packets -p tcp ! --syn -m state --state \
NEW -j LOG --log-prefix "IPTABLES NEW NOT SYN: "
iptables -A bad_tcp_packets -p tcp ! --syn -m state --state NEW -j DROP
# enable Masquerade and forwarding
iptables -A FORWARD -i $LAN_NIC1 -o $WAN_NIC -j ACCEPT
#iptables -A FORWARD -i $LAN_NIC2 -o $WAN_NIC -j ACCEPT
#iptables -A FORWARD -i $LAN_NIC3 -o $WAN_NIC -j ACCEPT
iptables -t nat -A POSTROUTING -s 192.168.0.2 -j MASQUERADE
#iptables -t nat -A POSTROUTING -s 192.168.1.2 -j MASQUERADE
#iptables -t nat -A POSTROUTING -s 192.168.2.2 -j MASQUERADE
iptables -A FORWARD -i $LAN_NIC1 -j ACCEPT
iptables -A FORWARD -i $LAN_NIC2 -j ACCEPT
iptables -A FORWARD -i $LAN_NIC3 -j ACCEPT
iptables -A FORWARD -p tcp -j bad_tcp_packets
iptables -A FORWARD -i $WAN_NIC -o $LAN_NIC1 -m state --state ESTABLISHED,RELATED -j ACCEPT
#iptables -A FORWARD -i $WAN_NIC -o $LAN_NIC2 -m state --state ESTABLISHED,RELATED -j ACCEPT
#iptables -A FORWARD -i $WAN_NIC -o $LAN_NIC3 -m state --state ESTABLISHED,RELATED -j ACCEPT
#iptables -A FORWARD -i $LAN_NIC1 -o $WAN_NIC -j ACCEPT
#iptables -A FORWARD -i $LAN_NIC2 -o $WAN_NIC -j ACCEPT
#iptables -A FORWARD -i $LAN_NIC1 -o $LAN_NIC2 -j ACCEPT
#iptables -A FORWARD -i $LAN_NIC2 -o $LAN_NIC1 -j ACCEPT
#iptables -A FORWARD -i $LAN_NIC1 -o $LAN_NIC3 -j ACCEPT
#iptables -A FORWARD -i $LAN_NIC3 -o $LAN_NIC1 -j ACCEPT
#iptables -A FORWARD -i $LAN_NIC2 -o $LAN_NIC3 -j ACCEPT
#iptables -A FORWARD -i $LAN_NIC3 -o $LAN_NIC2 -j ACCEPT
# Open ports on router for server/services
#iptables -A INPUT -p tcp -j bad_tcp_packets
#iptables -A INPUT -p tcp --syn --dport 80 -j ACCEPT
#iptables -A INPUT -p tcp --syn --dport 21 -j ACCEPT
iptables -A INPUT -s 192.168.0.2 -d 192.168.0.1 -p tcp --syn --dport 22 -j ACCEPT
#iptables -A INPUT -s 192.168.0.2 -d 192.168.1.1/24 -p tcp --syn --dport 22 -j ACCEPT
iptables -A INPUT -p ALL -i lo -s 127.0.0.1 -j ACCEPT
iptables -A INPUT -p ALL -i lo -s $LAN_IP_NET1 -j ACCEPT
iptables -A INPUT -p ALL -i lo -s $LAN_IP_NET2 -j ACCEPT
iptables -A INPUT -p ALL -i lo -s $LAN_IP_NET3 -j ACCEPT
# STATE RELATED for router
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
echo -e "\n\n\tDone Loading Rules\n"
###############################################
save the above script as rc.firewall. Make it executable by:
chmod 755 rc.firewall
Try this as root:
iptables -L
(shows current rules)
Then
sh rc.firewall
that should load the rules. Assuming that your internet connection is eth0 and internal is eth1, and you configure eth1 as 192.168.0.1 and winXP as 192.168.0.2.
TBH I have looked at the IP masquerading how to and then I look at a post like je_fro's and can't find the similiarity.
Plus I'm not exactly sure what to do with the scripts. At my level of experience I need pretty much explicit directions. :(
je_fro
07-14-2003, 08:42 PM
Think of the script as just running the command, with options, many times.
Kind of like:
man somefile
or
ls -l
You're inserting those rules when you run the script. You'll need to make it permanent, though. Do this:
man iptables-save
terribleRobbo
07-14-2003, 08:48 PM
If you want it to start automatically on boot, put it in /etc/rc.d/ (if you're running RedHat).
I'm not sure if you have to reference it from another file, though... rc.local? /me needs confirmation. :(
One of the things that has bothered me since I started using Linux is that it's picky about letting me change directories.
for instance:
[christopher@x1-6-00-80-c8-dd-4c-f6 christopher]$ cd /Desktop
bash: cd: /Desktop: No such file or directory
Often I can't get to a directory in a console that I can plainly see Konqueror window. Frustrating.
I want the machine to share the Internet connection as long as it's on. If it's on it's always shared.
Originally posted by tanna
there is no /Desktop. It's most likely /home/christopher/Desktop.
Ok that worked. I just assumed that because it said [christopher@x1-6-00-80-c8-dd-4c-f6 christopher]$ cd /Desktop that I was already in the user directory...
Where do I save the file so it automatically shares my connection when using MDK 9.1? At that point I'll give it a shot. :)
je_fro
07-14-2003, 09:23 PM
Test it out.
su
<passwd>
sh rc.firewall
You should see a few messages, and then "Done Loading Rules"
Let me know if you see errors.
I saved it to my desktop and...
[christopher@x1-6-00-80-c8-dd-4c-f6 Desktop]$ chmod 755rc.firewall
chmod: too few arguments
Try `chmod --help' for more information.
:confused:
terribleRobbo
07-14-2003, 09:37 PM
Put a space between 755 and rc.firewall
alright that fixed that but of course the next step didn't work.
[root@x1-6-00-80-c8-dd-4c-f6 Desktop]# iptables -L
bash: iptables: command not found
[root@x1-6-00-80-c8-dd-4c-f6 Desktop]# iptables - L
bash: iptables: command not found
je_fro
07-14-2003, 09:40 PM
export PATH=$PATH:/sbin
and try again.
[root@x1-6-00-80-c8-dd-4c-f6 Desktop]# export PATH=$PATH:/sbin
[root@x1-6-00-80-c8-dd-4c-f6 Desktop]# iptables -L
bash: iptables: command not found
je_fro
07-14-2003, 09:45 PM
whereis iptables
or
find / | grep iptables
[root@x1-6-00-80-c8-dd-4c-f6 Desktop]# whereis iptables
iptables:
[root@x1-6-00-80-c8-dd-4c-f6 Desktop]# find / | grep iptables
find: /mnt/floppy: Input/output error
find: /mnt/cdrom: Input/output error
/usr/share/doc/HOWTO/HTML/en/Adv-Routing/lartc.bridging.iptables.html
/usr/share/doc/HOWTO/HTML/en/Linuxs-20030211/Adv-Routing-HOWTO/lartc.bridging.iptables.html
:confused: :eek:
je_fro
07-14-2003, 09:52 PM
http://rpmfind.net/linux/rpm2html/search.php?query=iptables&submit=Search+...
I've downloaded this one ftp://rpmfind.net/linux/Mandrake/9.0/x86_64/Mandrake/RPMS/iptables-1.2.6a-1mdk.x86_64.rpm
I went to install it and a little window came up and said: Everything is already installed.
je_fro
07-14-2003, 09:57 PM
find / | grep iptables
[root@x1-6-00-80-c8-dd-4c-f6 Desktop]# su
[root@x1-6-00-80-c8-dd-4c-f6 Desktop]# find / | grep iptables
find: /mnt/floppy: Input/output error
find: /mnt/cdrom: Input/output error
/home/christopher/.kde/share/apps/RecentDocuments/iptables-1.2.6a-1mdk.x86_64.rpm.desktop
/home/christopher/Desktop/iptables-1.2.6a-1mdk.x86_64.rpm
/usr/share/doc/HOWTO/HTML/en/Adv-Routing/lartc.bridging.iptables.html
/usr/share/doc/HOWTO/HTML/en/Linuxs-20030211/Adv-Routing-HOWTO/lartc.bridging.iptables.html
je_fro
07-14-2003, 10:04 PM
This is wierd. I've used Mandrake for about 5 minutes, so I'm not familiar with it. It should be the same, though. Try:
/usr/sbin/iptables -L
/sbin/iptables -L
again. If that doesn't work then I welcome any input from Mandrake users.
[root@x1-6-00-80-c8-dd-4c-f6 Desktop]# /usr/sbin/iptables -L
bash: /usr/sbin/iptables: No such file or directory
[root@x1-6-00-80-c8-dd-4c-f6 Desktop]# /sbin/iptables -L
bash: /sbin/iptables: No such file or directory
je_fro
07-14-2003, 10:10 PM
According to Mandrake docs, iptables is supposed to be in /sbin.
Yet it appears that you don't have it anywhere. Let me search around.
okie dokie.
This is why I was so trepidatious before starting this...so far all my Linux adventures have been like this. :o
Originally posted by tanna
type
locate iptables
Just for kicks. ;)
[root@x1-6-00-80-c8-dd-4c-f6 Desktop]# locate iptables
bash: locate: command not found
Weeee! Kicks! :D
je_fro
07-14-2003, 10:35 PM
whereis ipchains
find / | grep ipchains
[root@x1-6-00-80-c8-dd-4c-f6 Desktop]# whereis ipchains
ipchains:
[root@x1-6-00-80-c8-dd-4c-f6 Desktop]# find / | grep ipchains
find: /mnt/floppy: Input/output error
find: /mnt/cdrom: Input/output error
/usr/share/doc/HOWTO/HTML/en/IP-Masquerade/ipchains-vs-ipfwadm.html
/usr/share/doc/HOWTO/HTML/en/IP-Masquerade/ipchains-on-2.4.x.html
/usr/share/doc/HOWTO/HTML/en/Linuxs-20030211/IP-Masquerade-HOWTO/ipchains-vs-ipfwadm.html
/usr/share/doc/HOWTO/HTML/en/Linuxs-20030211/IP-Masquerade-HOWTO/ipchains-on-2.4.x.html
/usr/share/webmin/caldera/ipchains
/usr/share/webmin/caldera/ipchains/images
/usr/share/webmin/caldera/ipchains/images/icon.gif
/usr/share/webmin/mscstyle3/ipchains
/usr/share/webmin/mscstyle3/ipchains/images
/usr/share/webmin/mscstyle3/ipchains/images/icon.gif
/lib/modules/2.4.21-0.13mdk/kernel/net/ipv4/netfilter/ipchains.o.gz
[root@x1-6-00-80-c8-dd-4c-f6 Desktop]#
je_fro
07-14-2003, 10:38 PM
http://doc.mandrakelinux.com/MandrakeLinux/91/en/Starter.html/drakgw.html
Actually I tried DrakGw and caused some problems and I was chastised on the Mandrake forums for using it. Apparently it's not a good thing. Gimme a moment and I'll dig up the links on this.
je_fro
07-14-2003, 10:44 PM
I don't know what to tell you. I was hoping someone more knowledgable than me about Mandrake would show up. It just looks to me like iptables isn't installed on your machine. Maybe Mandrake has modified it and changed the name.....I don't know.
http://www.mandrakeusers.org/viewtopic.php?t=6322&highlight=drakgw
http://www.mandrakeusers.org/viewtopic.php?t=6271
After all that I ended up doing a fresh install of MDK 9.1 which seems to have caused me to lose a portion of my hdd and now Opera doesn't work properly...but I digress. I just want to get ICS up and running.
je_fro
07-14-2003, 10:48 PM
head over to the IRC channel for justlinux?
You know how?
Connect to irc.freenode.net and then : /join #justlinux
I'm now on there. At least I appear to be.
Edit I think I'm on there as christopher.
My behaviour or the "command not found" part?
[root@x1-6-00-80-c8-dd-4c-f6 christopher]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:BA:1F:A1:56
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:518 errors:0 dropped:0 overruns:0 frame:0
TX packets:1564 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:125743 (122.7 Kb) TX bytes:265572 (259.3 Kb)
Interrupt:10 Base address:0xcc00
eth0:9 Link encap:Ethernet HWaddr 00:50:BA:1F:A1:56
inet addr:169.254.6.61 Bcast:169.254.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:10 Base address:0xcc00
eth1 Link encap:Ethernet HWaddr 00:80:C8:DD:4C:F6
inet addr:xx.xx.xxx.xxx Bcast:255.255.255.255 Mask:255.255.252.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:641091 errors:0 dropped:0 overruns:0 frame:0
TX packets:118515 errors:0 dropped:0 overruns:0 carrier:0
collisions:374 txqueuelen:100
RX bytes:137609999 (131.2 Mb) TX bytes:17944987 (17.1 Mb)
Interrupt:12 Base address:0xd000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:4553 errors:0 dropped:0 overruns:0 frame:0
TX packets:4553 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:336371 (328.4 Kb) TX bytes:336371 (328.4 Kb)
[root@x1-6-00-80-c8-dd-4c-f6 christopher]#
je_fro
07-15-2003, 12:33 AM
Change this stuff:
LAN_IP_NET1='192.168.0.1/24'
LAN_IP_NET2='192.168.1.1/24'
LAN_IP_NET3='192.168.2.1/24'
LAN_NIC1='eth1'
LAN_NIC2='eth2'
LAN_NIC3='eth3'
WAN_NIC='eth0'
You need:
LAN_NIC1='eth0'
WAN_NIC='eth1'
And you'll need to change the address of eth0 to 192.168.0.1
So delete those lines in favour of the 2 new ones?
je_fro
07-15-2003, 12:36 AM
But just edit them. What text editor do you have?
(You use gnome or kde?)
Using KDE editing the files with KWrite.
How do I change the address of eth0?
Should I edit out anything on my ifconfig post that could be bad for my PC's security?
je_fro
07-15-2003, 12:47 AM
you might want to xx out eth1's ip up there.
je_fro
07-15-2003, 12:49 AM
ifconfig eth0 192.168.0.1
Alright I'm close aren't I?
I have my XP machine configured like this:
ip: 192.168.0.2
subnet mask: 255.255.255.0
Default Gateway: 192.168.0.1
je_fro
07-15-2003, 12:54 AM
You may need to do:
ifconfig eth0 192.168.0.1 broadcast 192.168.0.255 netmask 255.255.255.0
and that should do it!
Originally posted by je_fro
ifconfig eth0 192.168.0.1 broadcast 192.168.0.255 netmask 255.255.255.0
Put that in the console right?
Any restarting?
je_fro
07-15-2003, 12:56 AM
Nope, no rebooting.
Check the results with:
ifconfig
[root@x1-6-00-80-c8-dd-4c-f6 christopher]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:BA:1F:A1:56
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:616 errors:0 dropped:0 overruns:0 frame:0
TX packets:1695 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:143219 (139.8 Kb) TX bytes:286385 (279.6 Kb)
Interrupt:10 Base address:0xcc00
eth0:9 Link encap:Ethernet HWaddr 00:50:BA:1F:A1:56
inet addr:169.254.6.61 Bcast:169.254.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:10 Base address:0xcc00
eth1 Link encap:Ethernet HWaddr 00:80:C8:DD:4C:F6
inet addr:xx.xx.xxx.xxx Bcast:255.255.255.255 Mask:255.255.252.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:664059 errors:0 dropped:0 overruns:0 frame:0
TX packets:125703 errors:0 dropped:0 overruns:0 carrier:0
collisions:397 txqueuelen:100
RX bytes:143701955 (137.0 Mb) TX bytes:19863490 (18.9 Mb)
Interrupt:12 Base address:0xd000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:4757 errors:0 dropped:0 overruns:0 frame:0
TX packets:4757 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:350815 (342.5 Kb) TX bytes:350815 (342.5 Kb)
[root@x1-6-00-80-c8-dd-4c-f6 christopher]#
So far the XP machine hasn't been able to get on the net.
je_fro
07-15-2003, 01:01 AM
Do you have DNS addresses from your ISP to put in XP?
Originally posted by je_fro
Do you have DNS addresses from your ISP to put in XP?
Crap! No I don't.
Just called tech support to get it and they won't give it to me.
I think it may be because they want to charge me for networking my PCs. Jerks.
je_fro
07-15-2003, 01:32 AM
#!/bin/sh
echo 1 > /proc/sys/net/ipv4/ip_forward
LAN_IP_NET='192.168.0.1/24'
LAN_NIC='eth0'
WAN_NIC='eth1'
iptables -t nat -F POSTROUTING
iptables -t nat -F PREROUTING
iptables -t nat -F OUTPUT
iptables -F
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT
# Enable Masquerade
iptables -t nat -A POSTROUTING -s $LAN_IP_NET -j MASQUERADE
iptables -A FORWARD -j ACCEPT -i $LAN_NIC -s $LAN_IP_NET
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
# RELATED only
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
############################################
save that as anything and :
chmod 755 anything
sh anything
Then try XP again.
Wooohoo!! For anyone keeping score that worked!! :D
I'm well pleased. Many thanks to those that helped especially je_fro!!
Well now it's no longer working! :(
I haven't changed a thing. I just turned both machines on. :confused:
je_fro
07-15-2003, 05:05 PM
What happened?
What do you get from ifconfig?
dmesg | grep eth ?
route -v ?
iptables -L ?
echo $PATH ?
[root@x1-6-00-80-c8-dd-4c-f6 rc.d]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:BA:1F:A1:56
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:276 errors:0 dropped:0 overruns:0 frame:0
TX packets:321 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:31146 (30.4 Kb) TX bytes:53034 (51.7 Kb)
Interrupt:10 Base address:0xcc00
eth0:9 Link encap:Ethernet HWaddr 00:50:BA:1F:A1:56
inet addr:169.254.6.61 Bcast:169.254.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:10 Base address:0xcc00
eth1 Link encap:Ethernet HWaddr 00:80:C8:DD:4C:F6
inet addr:xx.xx.xxx.xxx Bcast:255.255.255.255 Mask:255.255.252.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:88244 errors:0 dropped:0 overruns:0 frame:0
TX packets:10027 errors:0 dropped:0 overruns:0 carrier:0
collisions:16 txqueuelen:100
RX bytes:12995832 (12.3 Mb) TX bytes:1897427 (1.8 Mb)
Interrupt:12 Base address:0xd000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:484 errors:0 dropped:0 overruns:0 frame:0
TX packets:484 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:41308 (40.3 Kb) TX bytes:41308 (40.3 Kb)
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
[ -f /etc/sysconfig/msec ] && source /etc/sysconfig/msec
[ -z "$SECURE_LEVEL" ] && SECURE_LEVEL=3
# Source functions
. /etc/init.d/functions
if [ -f /etc/mandrake-release -a $SECURE_LEVEL -lt 4 ]; then
R=$(cat /etc/mandrake-release)
arch=$(uname -m)
a="a"
case "_$arch" in
_a*) a="an";;
_i*) a="an";;
esac
NUMPROC=`egrep -c "^cpu[0-9]+" /proc/stat`
if [ "$NUMPROC" -gt "1" ]; then
SMP="$NUMPROC-processor "
[ "$NUMPROC" = "2" ] && \
SMP="Dual-processor "
if [ "$NUMPROC" = "8" -o "$NUMPROC" = "11" ]; then
a="an"
else
a="a"
fi
fi
# This will overwrite /etc/issue at every boot. So, make any changes you
# want to make to /etc/issue here or you will lose them when you reboot.
if [ -x /usr/bin/linux_logo ];then
/usr/bin/linux_logo -c -n -f | sed -e 's|\\|\\\\|g' > /etc/issue
echo "" >> /etc/issue
else
> /etc/issue
fi
echo "$R" >> /etc/issue
echo "Kernel $(uname -r) on $a $SMP$(uname -m) / \l" >> /etc/issue
if [ "$SECURE_LEVEL" -le 3 ];then
echo "Welcome to ${HOST}" > /etc/issue.net
echo "$R" >> /etc/issue.net
echo "Kernel $(uname -r) on $a $SMP$(uname -m)" >> /etc/issue.net
else
echo "Welcome to Mandrake Linux" > /etc/issue.net
echo "-------------------------" >> /etc/issue.net
fi
elif [ $SECURE_LEVEL -ge 4 ]; then
rm -f /etc/issue /etc/issue.net
fi
touch /var/lock/subsys/local
I restarted my Linux box because it was getting REAL slow and now the XP machine won't log on again. :(
je_fro
07-15-2003, 08:23 PM
Are there any services running that you don't need?
Check this out:
http://justlinux.com/forum/search.php?s=&action=showresults&searchid=675850&sortby=lastpost&sortorder=descending
What's in that eth0 script again? The one you edited?
DEVICE=eth0
BOOTPROTO=none
NETMASK=255.255.255.0
ONBOOT=yes
MII_NOT_SUPPORTED=yes
NEEDHOSTNAME=yes
IPADDR=192.168.0.1
BROADCAST=192.168.0.255
That one?
I also can't get into the justlinux irc channel anymore. :(
louis_b
07-18-2003, 04:02 AM
I am also running Mandrake 9.0 and cannot find iptables and ipchains although the documentaiton is there. I remember that when installing, I chose the least amount of security (no firewall). Perhaps ipchains and iptables were not installed due to selecting that option.
je_fro
07-18-2003, 04:05 AM
urpmi iptables
chesskidd
07-27-2003, 05:23 AM
Originally posted by ions
eth1 Link encap:Ethernet HWaddr 00:80:C8:DD:4C:F6
inet addr:xx.xx.xxx.xxx Bcast:255.255.255.255 Mask:255.255.252.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:88244 errors:0 dropped:0 overruns:0 frame:0
TX packets:10027 errors:0 dropped:0 overruns:0 carrier:0
collisions:16 txqueuelen:100
RX bytes:12995832 (12.3 Mb) TX bytes:1897427 (1.8 Mb)
Interrupt:12 Base address:0xd000
eheh, there is a smilie face in the line :D