RE: MRTG and IPTABLES

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear sir,

Have tried your commands below but when I run my iptables script, 

I get "command not found" and it points to the line 

$SNMP_POLLER_IP="xxx.xxx.xxx.xxx"

Thanks
gy


-----Original Message-----
From: Daniel F. Chief Security Engineer -
[mailto:danielf@xxxxxxxxxxxxxxx] 
Sent: Wednesday, January 07, 2004 6:18 PM
To: Gilles Yue; netfilter@xxxxxxxxxxxxxxxxxxx
Subject: Re: MRTG and IPTABLES

try

$IPTABLES -A INPUT -p udp --dport 161 -j ACCEPT 

assuming that yuo are tryinh to accept port 161 on the local machine. if
you 
doing stateful it should look similar to this. 

# IP of machine running MRTG
$SNMP_POLLER_IP="xxx.xxx.xxx.xxx"

$IPTABLES -A INPUT -p udp -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPTABLES -A INPUT -p udp --dport 161 -m state --state NEW -s
$SNMP_POLLER_IP 
-j ACCEPT

$IPTABLES -A OUTPUT -p udp -m state --state ESTABLISHED,RELATED -j
ACCEPT
$IPTABLES -A OUTPUT -p udp --sport 161 -m state --state NEW -s
$SNMP_POLLER_IP 
-j ACCEPT

This is assuming you have set the ploicies to drop
$IPTABLES -P INPUT DROP
$IPTABLES -P OUTPUT DROP

On Wednesday 07 January 2004 06:46, Gilles Yue wrote:
> Hi,
>
> Is this the way it should be in iptables?
>
> #Open SNMP Ports
> $IPTABLES -A INPUT -p udp -m udp --dport 161 -j ACCEPT
>
> Have tried it, not working
>
> Thanks.
> Gy
>
> -----Original Message-----
> From: Daniel F. Chief Security Engineer -
> [mailto:danielf@xxxxxxxxxxxxxxx]
> Sent: Wednesday, January 07, 2004 4:45 PM
> To: Gilles Yue; netfilter@xxxxxxxxxxxxxxxxxxx
> Subject: Re: MRTG and IPTABLES
>
> SNMP UDP Ports 161 and 162 MRTG typically only uses 161.
>
>
> Thanks
>
> On Wednesday 07 January 2004 00:54, Gilles Yue wrote:
> > MRTG cannot work properly due to iptables running.
> >
> >
> >
> > Anybody knows which port number to open to enable MRTG to work
>
> properly.
>
> > Thanks.
> >
> >
> >
> > Rgds
> >
> > gy

-- 
Daniel Fairchild - Chief Security Officer | danielf@xxxxxxxxxxxxxxx
The distance between nothing and infinity is always the same no matter
how 
close you get to nothing.



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux