|
I�m running my slack box as my network connection with my cable modem. I run two network cards with IP tables to share my connection to my windows machines. I�m having some trouble with my new switch, and I think it�s a problem with my box but I wanted an outside opinion. My 10BT hub works fine with my network setup, but when I put in my new 100/10 switch my network will freeze and packets just stop going through. I�m running Linksys network cards in all my machines and I�m thinking that the problem might lay in the fact that the Linux drivers done by Linksys are just a hacked version of the tulip driver. I�ve tried running my windows machines in all different network settings including 10BT Half Duplex and it still locks up. I�ve also noticed that it locks up a lot when I�m doing file transfers through my samba setup, which might also be the problem. I�m not sure really if it�s a problem with my IP tables setup or my samba setup or what. Anyone have any ideas on where I should be focusing to fix the problem? I will include my IP tables script down below so that can be viewed.
Thanks, Kelly Shutt
#!/bin/sh # # rc.firewall - v0.50 # # Initial SIMPLE IP Masquerade test for 2.4.x kernels # using IPTABLES # # Load all required IP MASQ modules # # NOTE: Only load the IP MASQ modules you need. All current IP MASQ # modules are shown below but are commented out from loading. # echo -e "\n\nIPMASQ *TEST* rc.firewall ruleset - v0.50\n"
# The location of the 'iptables' program # # If your Linux distribution came with a copy of iptables, most # likely it is located in /sbin. If you manually compiled # iptables, the default location is in /usr/local/sbin # # ** Please use the "whereis iptables" command to figure out # ** where your copy is and change the path below to reflect # ** your setup # #IPTABLES=/sbin/iptables IPTABLES=/usr/sbin/iptables
#====================================================================== #== No editing beyond this line is required for initial MASQ testing == # Need to verify that all modules have all required dependencies # echo " - Verifying that all kernel modules are ok" /sbin/depmod -a
# With the new IPTABLES code, the core MASQ functionality is now either # modular or compiled into the kernel. This HOWTO compiles ALL IPTABLES # options as modules. If your kernel is compiled correctly, there is # NO need to manually load the kernel modules. # # NOTE: The following items are listed ONLY for informational reasons. # There is no reason to manual load these modules unless your # kernel is either mis-configured or you intentionally disabled # the kernel module autoloader. #
# Upon the commands of starting up IP Masq on the server, the # following kernel modules will be automatically loaded: # ===============================================================
#Load the main body of the IPTABLES module - "iptable" # - Loaded automatically when the "iptables" command is invoked
#Load the IPTABLES filtering module - "iptable_filter" # - Loaded automatically when filter policies are activated
#Load the geneal IPTABLES NAT code - "iptable_nat" # - Loaded automatically when MASQ functionality is turned on
#Load the SNAT IPTABLES "Masq" code - "ipt_MASQUERADE" # - Loaded automatically when MASQ functionality is turned on
#Load the stateful connection tracking framework - "ip_conntrack" # # This module in itself does nothing without other specific # conntrack modules being loaded as well # # - Loaded automatically when MASQ functionality is enabled # to properly MASQ protocols such as IRC, FTP, etc.
#Loads the OUTGOING FTP NAT functionality into the core IPTABLES code # # Disabled by default -- remove the "#" on the next line to activate /sbin/insmod ip_nat_ftp
#Load the INCOMING FTP tracking mechanism for the connection tracking #code # # Disabled by default -- remove the "#" on the next line to activate /sbin/insmod ip_conntrack_ftp
#CRITICAL: Enable IP forwarding since it is disabled by default since # # Redhat Users: you may try changing the options in # /etc/sysconfig/network from: # # FORWARD_IPV4=false # to # FORWARD_IPV4=true # echo " - Enabling packet forwarding in the kernel" echo "1" > /proc/sys/net/ipv4/ip_forward
# Dynamic IP users: # # If you get your IP address dynamically from SLIP, PPP, or DHCP, # enable this following option. This enables dynamic-address hacking # which makes the life with Diald and similar programs much easier. # echo " - Enabling dynamic addressing measures" echo "1" > /proc/sys/net/ipv4/ip_dynaddr
# Enable simple IP forwarding and Masquerading # # NOTE: In IPTABLES speak, IP Masquerading is a form of SourceNAT or SNAT. # # NOTE #2: The following is an example for an internal LAN address in the # 192.168.0.x network with a 255.255.255.0 or a "24" bit subnet mask # connecting to the Internet on external interface "eth0". This # example will MASQ internal traffic out to the Internet not not # allow non-initiated traffic into your internal network. # # NOTE #3: You must change "eth0" to say "ppp0" if you are a modem user. # # ** Please change the above network numbers, subnet mask, and your # *** Internet connection interface name to match your setup # echo " - Flushing old IP Tables" $IPTABLES -F
echo " - Setting the default FORWARD policy to 'ACCEPT'" $IPTABLES -P FORWARD ACCEPT
echo " - Enabling SNAT (IPMASQ) functionality on eth0" $IPTABLES -t nat -A POSTROUTING -o eth0 -j MASQUERADE
echo -e "\nDone.\n" |
- Re: [Siglinux] Linux networking problem Kelly Shutt
- Re: [Siglinux] Linux networking problem Paul Sack
- RE: [Siglinux] Linux networking problem Kelly Shutt
