nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

About iptables output

This is a discussion on About iptables output within the Networking, Firewalls and Security forums, part of the Mastering Servers category; Hi folks, Ubuntu 7.04 server amd64 I have a firewall script running on /etc/init.d/rc.local Performed following steps. $ sudo cp ...


Go Back   nixCraft Linux Forum > Mastering Servers > Networking, Firewalls and Security

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 09-30-2007, 08:30 AM
Member
User
 
Join Date: Sep 2007
My distro: Debian
Posts: 81
Rep Power: 1
satimis is on a distinguished road
Default About iptables output

Hi folks,


Ubuntu 7.04 server amd64


I have a firewall script running on /etc/init.d/rc.local


Performed following steps.

$ sudo cp -p /etc/init.d/rc.local /etc/network/if-up.d/iptables.start
$ sudo chmod 755 /etc/network/if-up.d/iptables.start
$ sudo reboot

to reboot the server


$ sudo iptables -nvL
Code:
Chain INPUT (policy ACCEPT 947 packets, 936K bytes)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     0    --  *      *       0.0.0.0/0            xxx.xxx.xxx.xxx      state RELATED,ESTABLISHED 
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            xxx.xxx.xxx.xxx      tcp dpt:22 
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            xxx.xxx.xxx.xxx      tcp dpt:8222 
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            xxx.xxx.xxx.xxx      tcp dpt:8333 
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            xxx.xxx.xxx.xxx      tcp dpt:902 
    0     0 REJECT     0    --  *      *       0.0.0.0/0            xxx.xxx.xxx.xxx      reject-with icmp-port-unreachable 

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain OUTPUT (policy ACCEPT 810 packets, 163K bytes)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     0    --  *      *       xxx.xxx.xxx.xxx       0.0.0.0/0           state RELATED,ESTABLISHED 
    0     0 ACCEPT     udp  --  *      *      xxx.xxx.xxx.xxx       0.0.0.0/0           udp dpt:53 
    0     0 REJECT     0    --  *      *       127.0.0.1            0.0.0.0/0           reject-with icmp-port-unreachable 
    0     0 REJECT     0    --  *      *       xxx.xxx.xxx.xxx       0.0.0.0/0           reject-with icmp-port-unreachable
Then

$ sudo /etc/init.d/rc.local stop
$ sudo /etc/init.d/rc.local start
Code:
 * Running local boot scripts (/etc/rc.local)
   ...done.
$ sudo iptables -nvL
Code:
Chain INPUT (policy ACCEPT 955 packets, 936K bytes)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     0    --  *      *       0.0.0.0/0            xxx.xxx.xxx.xxx      state RELATED,ESTABLISHED 
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            xxx.xxx.xxx.xxx      tcp dpt:22 
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            xxx.xxx.xxx.xxx      tcp dpt:8222 
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            xxx.xxx.xxx.xxx      tcp dpt:8333 
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            xxx.xxx.xxx.xxx      tcp dpt:902 
    0     0 REJECT     0    --  *      *       0.0.0.0/0            xxx.xxx.xxx.xxx      reject-with icmp-port-unreachable
    0     0 ACCEPT     0    --  *      *       0.0.0.0/0            xxx.xxx.xxx.xxx      state RELATED,ESTABLISHED 
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            xxx.xxx.xxx.xxx      tcp dpt:22 
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            xxx.xxx.xxx.xxx      tcp dpt:8222 
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            xxx.xxx.xxx.xxx      tcp dpt:8333 
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            xxx.xxx.xxx.xxx      tcp dpt:902 
    0     0 REJECT     0    --  *      *       0.0.0.0/0            xxx.xxx.xxx.xxx      reject-with icmp-port-unreachable

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain OUTPUT (policy ACCEPT 817 packets, 163K bytes)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     0    --  *      *       xxx.xxx.xxx.xxx       0.0.0.0/0           state RELATED,ESTABLISHED 
    0     0 ACCEPT     udp  --  *      *       xxx.xxx.xxx.xxx       0.0.0.0/0           udp dpt:53 
    0     0 REJECT     0    --  *      *       127.0.0.1            0.0.0.0/0           reject-with icmp-port-unreachable
    0     0 REJECT     0    --  *      *       xxx.xxx.xxx.xxx       0.0.0.0/0           reject-with icmp-port-unreachable
    0     0 ACCEPT     0    --  *      *       xxx.xxx.xxx.xxx       0.0.0.0/0           state RELATED,ESTABLISHED 
    0     0 ACCEPT     udp  --  *      *       xxx.xxx.xxx.xxx       0.0.0.0/0           udp dpt:53 
    0     0 REJECT     0    --  *      *       127.0.0.1            0.0.0.0/0           reject-with icmp-port-unreachable
    0     0 REJECT     0    --  *      *       xxx.xxx.xxx.xxx       0.0.0.0/0           reject-with icmp-port-unreachable
The output looks different.

Any advice. TIA


B.R.
satimis
Reply With Quote
Sponsored Links
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Create output in columns rakeshrhn Shell scripting 5 12-07-2007 06:27 PM
text output to mysql chebbab Shell scripting 4 11-26-2007 07:29 PM
How to redirect Output puppen Shell scripting 15 12-06-2006 08:44 PM
SED pass a output line to another cillo Shell scripting 6 11-01-2006 01:59 PM
Sound Output recording miklos Shell scripting 2 10-19-2006 01:05 AM


All times are GMT +5.5. The time now is 01:56 AM.


Powered by vBulletin® Version 3.7.2 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36