Results 1 to 4 of 4
|
Enjoy an ad free experience by logging in. Not a member yet? Register.
|
|
-
03-04-2003 #1
- Join Date
- Jan 2003
- Posts
- 22
[rh8.0] losing ip-adress or not even sending one
#!/bin/sh
IPTABLES=/sbin/iptables
EXTIF="eth1"
INTIF="eth0"
echo " External Interface: $EXTIF"
echo " Internal Interface: $INTIF"
echo -en " loading modules: "
echo " - Verifying that all kernel modules are ok"
/sbin/depmod -a
echo -en "ip_tables, "
/sbin/insmod ip_tables
echo -en "ip_conntrack, "
/sbin/insmod ip_conntrack
echo -en "ip_conntrack_ftp, "
/sbin/insmod ip_conntrack_ftp
echo -en "iptable_nat, "
/sbin/insmod iptable_nat
echo -en "ip_nat_ftp, "
/sbin/insmod ip_nat_ftp
echo " enabling forwarding.."
echo "1" > /proc/sys/net/ipv4/ip_forward
echo " enabling DynamicAddr.."
echo "1" > /proc/sys/net/ipv4/ip_dynaddr
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
oh, and i forgot to mention the ip's
server: 192.168.0.1 and subnetmask 255.255.255.0
client: 192.168.0.2 and the same subnetmask
hope someone finds the mistake because it's really starting to bug me
thanx hehe
-
03-05-2003 #2
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
How do you mean that it doesn't get an IP addr? Both computers already have one (192.168.0.[12]), right? Which computer is it that gets into trouble, the server or the client?
-
03-08-2003 #3
- Join Date
- Jan 2003
- Posts
- 22
Originally Posted by Dolda2000
-
03-19-2003 #4
- Join Date
- Jan 2003
- Posts
- 22
just to let you guys know and maybe for people who try the search and hook up with this topic. i found the answer ... i forgot to add the dns servers from my ISP to the DNS list in the TCP/IP section of the network configuration ... so that's the stupid mistake i made hehehe
...