Koozali.org: home of the SME Server

what service runs masq?

Offline hanscees

  • *
  • 267
  • +0/-0
    • nl.linkedin.com/in/hanscees/
what service runs masq?
« on: March 14, 2006, 09:06:11 PM »
Hi,
I have been delving into /etc/e-smith/events and actions but I just can't find it.

When I run dhcp on my external interface to get an ip-address somehow iptables is started again (masq). But I just cannot find where.
Or perhaps some other service does this.

Any hint would be greatly apreciated.

Hans-Cees
nl.linkedin.com/in/hanscees/

Offline hanscees

  • *
  • 267
  • +0/-0
    • nl.linkedin.com/in/hanscees/
what service runs masq?
« Reply #1 on: March 14, 2006, 09:22:12 PM »
Of course once you almost give up you find a clue (messages file).

This is what seems to happen:

dhclient gets a new ip-address.
then /etc/e-smith/events/ip-change is run (why?).
This exists of the actions:
S15set-external-ip
S85update-dns
services2adjust
templates2expand

The services to adjust contains this:
lrwxrwxrwx  1 root root    6 Sep 17 05:49 masq -> adjust
lrwxrwxrwx  1 root root    7 Sep 17 05:50 ntpd -> restart
lrwxrwxrwx  1 root root    7 Sep 17 05:50 pptpd -> sigterm
lrwxrwxrwx  1 root root    6 Sep 17 05:50 qmail -> sighup
lrwxrwxrwx  1 root root    7 Sep 17 05:50 tinydns -> sigusr2

So the masq "service" is adjusted.
But now for my question:
How exactly is masq adjusted? I know the script events/actions/adjust-services does this.  But htis script is not parsable by my brain. Masq is not a service in /services?

What is the commandline equivalent that is issued?


The errors by iptables are my own doing by the way so don't worry about them.

Hans-Cees

Mar 14 04:34:01 mail logger: heartbeat Tue Mar 14 04:34:01 CET 2006
Mar 14 04:34:01 mail crond(pam_unix)[5035]: session closed for user root
Mar 14 04:34:55 mail dhclient: DHCPREQUEST on eth1 to 213.221.136.16 port 67
Mar 14 04:34:55 mail dhclient: DHCPACK from 213.221.136.16
Mar 14 04:34:55 mail esmith::event[5062]: Processing event: ip-change
213.211.164.29
Mar 14 04:34:55 mail esmith::event[5062]: Running event handler:
/etc/e-smith/events/actions/generic_template_expand
Mar 14 04:34:56 mail esmith::event[5062]: expanding
/var/qmail/control/helohost
Mar 14 04:34:56 mail esmith::event[5062]: expanding
/var/qmail/control/mailrules.default
Mar 14 04:34:56 mail esmith::event[5062]: expanding
/var/qmail/control/bouncehost
Mar 14 04:34:56 mail esmith::event[5062]: expanding
/var/qmail/control/virtualdomains
Mar 14 04:34:57 mail esmith::event[5062]: expanding
/var/qmail/control/plusdomain
Mar 14 04:34:57 mail esmith::event[5062]: expanding
/var/qmail/control/locals
Mar 14 04:34:57 mail esmith::event[5062]: expanding /var/qmail/control/me
Mar 14 04:34:57 mail esmith::event[5062]: expanding
/var/qmail/control/smtproutes
Mar 14 04:34:57 mail esmith::event[5062]: expanding
/var/qmail/control/defaulthost
Mar 14 04:34:57 mail esmith::event[5062]: expanding
/var/qmail/control/databytes
Mar 14 04:34:57 mail esmith::event[5062]: expanding
/var/qmail/control/concurrencyremote
Mar 14 04:34:57 mail esmith::event[5062]: expanding
/var/qmail/control/rcpthosts
Mar 14 04:34:58 mail esmith::event[5062]: expanding
/var/qmail/control/badhelo
Mar 14 04:34:58 mail esmith::event[5062]: expanding
/var/qmail/control/concurrencylocal
Mar 14 04:34:58 mail esmith::event[5062]: expanding
/var/qmail/control/defaultdomain
Mar 14 04:34:58 mail esmith::event[5062]: expanding
/var/qmail/control/doublebounceto
Mar 14 04:34:58 mail esmith::event[5062]: expanding
/var/qmail/control/bouncefrom
Mar 14 04:34:58 mail esmith::event[5062]: expanding
/var/qmail/control/envnoathost
Mar 14 04:34:58 mail esmith::event[5062]: expanding
/var/qmail/alias/.qmail-default
Mar 14 04:34:58 mail esmith::event[5062]: expanding
/var/qmail/alias/.qmail-localdelivery-default
Mar 14 04:34:58 mail esmith::event[5062]: expanding /etc/hosts.allow
Mar 14 04:34:59 mail esmith::event[5062]: expanding /etc/services
Mar 14 04:34:59 mail esmith::event[5062]: expanding /etc/proftpd.conf
Mar 14 04:34:59 mail esmith::event[5062]: expanding /etc/securetty
Mar 14 04:35:00 mail esmith::event[5062]: expanding /etc/hosts.deny
Mar 14 04:35:00 mail esmith::event[5062]: expanding /etc/dhcpd.conf
Mar 14 04:35:00 mail esmith::event[5062]: expanding /etc/shells
Mar 14 04:35:00 mail esmith::event[5062]: expanding /etc/pptpd.conf
Mar 14 04:35:00 mail esmith::event[5062]: expanding /etc/fetchmail
Mar 14 04:35:01 mail esmith::event[5062]: expanding /etc/startmail
Mar 14 04:35:01 mail esmith::event[5062]: expanding /etc/ppp/ip-down.local
Mar 14 04:35:01 mail esmith::event[5062]: expanding /etc/ppp/options.pptpd
Mar 14 04:35:01 mail esmith::event[5062]: expanding /etc/ppp/ip-up.local
Mar 14 04:35:01 mail crond(pam_unix)[5064]: session opened for user root
by (uid=0)
Mar 14 04:35:01 mail logger: heartbeat Tue Mar 14 04:35:01 CET 2006
Mar 14 04:35:01 mail crond(pam_unix)[5064]: session closed for user root
Mar 14 04:35:01 mail esmith::event[5062]: expanding /etc/pam.d/passwd
Mar 14 04:35:02 mail esmith::event[5062]: expanding /home/e-smith/.qmail
Mar 14 04:35:02 mail esmith::event[5062]:
generic_template_expand=action|Event|ip-change|Action|generic_template_exp
and|Start|1142307295 579348|End|1142307302 202228|Elapsed|6.62288
Mar 14 04:35:02 mail esmith::event[5062]: Running event handler:
/etc/e-smith/events/ip-change/S15set-external-ip
Mar 14 04:35:02 mail esmith::event[5062]:
S15set-external-ip=action|Event|ip-change|Action|S15set-external-ip|Start|
1142307302 203536|End|1142307302 772883|Elapsed|0.569347
Mar 14 04:35:02 mail esmith::event[5062]: Running event handler:
/etc/e-smith/events/ip-change/S85update-dns
Mar 14 04:35:03 mail esmith::event[5062]:
S85update-dns=action|Event|ip-change|Action|S85update-dns|Start|1142307302
774194|End|1142307303 302689|Elapsed|0.528495
Mar 14 04:35:03 mail esmith::event[5062]: Running event handler:
/etc/e-smith/events/actions/adjust-services
Mar 14 04:35:03 mail esmith::event[5062]: adjusting qmail (sighup)
Mar 14 04:35:03 mail esmith::event[5062]: adjusting masq (adjust)
Mar 14 04:35:04 mail esmith::event[5062]: iptables: Table does not exist
(do you need to insmod?)
Mar 14 04:35:04 mail esmith::event[5062]: ERROR: Cannot find chain
ForwardedTCP in table filter
Mar 14 04:35:04 mail esmith::event[5062]: iptables: Table does not exist
(do you need to insmod?)
Mar 14 04:35:04 mail esmith::event[5062]: ERROR: Cannot find chain
ForwardedTCP in table filter
Mar 14 04:35:04 mail esmith::event[5062]: iptables v1.2.11: Unknown arg
--new-chain'
Mar 14 04:35:04 mail esmith::event[5062]: Try iptables -h' or 'iptables
--help' for more information.
Mar 14 04:35:04 mail esmith::event[5062]: iptables v1.2.11: Unknown arg
--jump'
Mar 14 04:35:04 mail esmith::event[5062]: Try iptables -h' or 'iptables
--help' for more information.
Mar 14 04:35:04 mail esmith::event[5062]: iptables: Table does not exist
(do you need to insmod?)
Mar 14 04:35:04 mail esmith::event[5062]: ERROR: Cannot find chain
ForwardedUDP in table filter
Mar 14 04:35:05 mail esmith::event[5062]: iptables: Table does not exist
(do you need to insmod?)
Mar 14 04:35:05 mail esmith::event[5062]: ERROR: Cannot find chain
ForwardedUDP in table filter
Mar 14 04:35:05 mail esmith::event[5062]: iptables v1.2.11: Unknown arg
--new-chain'
Mar 14 04:35:05 mail esmith::event[5062]: Try iptables -h' or 'iptables
--help' for more information.
Mar 14 04:35:05 mail esmith::event[5062]: iptables v1.2.11: Unknown arg
--jump'
Mar 14 04:35:05 mail esmith::event[5062]: Try iptables -h' or 'iptables
--help' for more information.
Mar 14 04:35:05 mail esmith::event[5062]: iptables: Table does not exist
(do you need to insmod?)
Mar 14 04:35:05 mail esmith::event[5062]: ERROR: Cannot find chain
InboundTCP in table filter
Mar 14 04:35:05 mail esmith::event[5062]: iptables: Table does not exist
(do you need to insmod?)
Mar 14 04:35:05 mail esmith::event[5062]: ERROR: Cannot find chain
InboundTCP in table filter
Mar 14 04:35:05 mail esmith::event[5062]: iptables v1.2.11: Unknown arg
--new-chain'
Mar 14 04:35:05 mail esmith::event[5062]: Try iptables -h' or 'iptables
--help' for more information.
Mar 14 04:35:05 mail esmith::event[5062]: iptables v1.2.11: Couldn't load
target denylog':/lib/iptables/libipt_denylog.so: cannot open shared
object file: No such file or directory
Mar 14 04:35:05 mail esmith::event[5062]:  
Mar 14 04:35:05 mail esmith::event[5062]: Try iptables -h' or 'iptables
--help' for more information.
nl.linkedin.com/in/hanscees/

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: what service runs masq?
« Reply #2 on: March 15, 2006, 01:10:59 AM »
Quote from: "hanscees"

I have been delving into /etc/e-smith/events and actions but I just can't find it.
...
Any hint would be greatly apreciated.


The devinfo mailing list is the best place to ask such questions.