Help with iptables

Help with iptables

Post by Tu Nguye » Tue, 05 Jun 2001 00:19:04



Hi All:
   I am attempting to use iptables to keep track of ip accounting for
each subnet.
I use an example straight from the note but still can't seem to get
iptables
to work correctly.
 Below is an example of my attempt to keep track of input/output data
for subnet 200 and subnet 34. For some reason, all traffic is counted
under INPUT and OUTPUT but none is registered in my two chains
net-200 and net-34.
 Can someone advise me? I am using:
      Debian Linux 2.4.4
      iptables v1.2.2
Thank you all
######### script to build iptables with subnet number replaced with xxx
#!/bin/bash
iptables -F
iptables -Z
iptables -N net-200
iptables -N net-34
iptables -A net-200 -j ACCEPT
iptables -A net-34 -j ACCEPT
iptables -A FORWARD -i eth0 -d xxx.xxx.200.0/24  -j net-200
iptables -A FORWARD -i eth0 -d xxx.xxx.34.0/24  -j net-34

######## here is  iptables -L -v -x
Chain INPUT (policy ACCEPT 172 packets, 20434 bytes)
    pkts      bytes target     prot opt in     out
source               destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
    pkts      bytes target     prot opt in     out
source               destination
       0        0 net-200    all  --  eth0   any
anywhere             136.159.200.0/24
       0        0 net-34     all  --  eth0   any
anywhere             136.159.34.0/24
Chain OUTPUT (policy ACCEPT 158 packets, 12686 bytes)
    pkts      bytes target     prot opt in     out
source               destination
Chain net-200 (1 references)
    pkts      bytes target     prot opt in     out
source               destination
       0        0 ACCEPT     all  --  any    any
anywhere             anywhere
Chain net-254 (0 references)
    pkts      bytes target     prot opt in     out
source               destination
Chain net-34 (1 references)
    pkts      bytes target     prot opt in     out
source               destination
       0        0 ACCEPT     all  --  any    any
anywhere             anywhere
lcomm1:/usr/local/bin#

 
 
 

1. Help with iptables - RH 8.0 - stopped working after "iptables -F"

Hello, I setup Redhat 8.0 as a gateway for VPN. VPN part (CIPE) worked
well and I was able to connect to the other network via VPN, but
clients won't connect to any Internet sites. I thought I will play
with the iptables to see if there was anything to do there. I ran
"iptables -t nat -F" and "iptables -F" thinking it will flush and
restart with default settings as earler.

Now, I can not connect to the Internet from the server as well as the
clients and obviousely my VPN does not work either. I re-installed
iptables rpm as mentioned in another post and that did not help
either.

Any help is greatly appreciated and Thanks in Advance.

DK

2. PTY allocation lossage

3. help with iptables - inbound connection

4. Automatic routing tables update ?

5. help /w iptables

6. following soft links and rm-ing...

7. Help with iptables

8. Restricting Multiple User Logins

9. help firewall iptables port forwading

10. Help with iptables (continued)

11. Help with iptables settings to get Yahoo Messenger to work.

12. need help for IPTABLES

13. help with iptables and iproute2