Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot bind to port for no good reason? #146

Open
cnbeining opened this issue Jan 1, 2015 · 2 comments
Open

Cannot bind to port for no good reason? #146

cnbeining opened this issue Jan 1, 2015 · 2 comments

Comments

@cnbeining
Copy link

Ubuntu 12.04 x64, latest commit ece963f:

Config file as in https://gist.github.com/phoenixlzx/bd9ae2629e3e1e72e978, with 443 deleted.

Error message:

/usr/sbin/sniproxy -f
2015-01-01 15:04:34 Failed to initialize listener [::]:465```

~# netstat -lptn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:1024            0.0.0.0:*               LISTEN      866/sshd        
tcp        0      0 127.0.0.1:9000          0.0.0.0:*               LISTEN      1488/php-fpm.conf)
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      1220/mysqld     
tcp        0      0 127.0.0.1:11211         0.0.0.0:*               LISTEN      1194/memcached  
tcp6       0      0 :::1024                 :::*                    LISTEN      866/sshd  

I've have some problem with dpkg, so I just run ./configure&&make&&make install.

Any idea what went wrong?

@dlundquist
Copy link
Owner

Are you running sniproxy as root? I was able to run that configuration after commenting out the filepath directive (a logger cannot be both a file logger and syslog logger at the same time. You might run sniproxy with strace to see what is failing.

@cnbeining
Copy link
Author

Yes, I am running it as root.

However, this time I do not have the error 2015-01-01 15:04:34 Failed to initialize listener [::]:465.

Strace:

execve("/usr/sbin/sniproxy", ["sniproxy", "-f", "-c", "/etc/sniproxy.conf"], [/* 33 vars */]) = 0
brk(0)                                  = 0x1241000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe23a8cc000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=76240, ...}) = 0
mmap(NULL, 76240, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fe23a8b9000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/usr/lib/libev.so.4", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320'\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=51512, ...}) = 0
mmap(NULL, 2149640, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe23a49f000
mprotect(0x7fe23a4ab000, 2093056, PROT_NONE) = 0
mmap(0x7fe23a6aa000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xb000) = 0x7fe23a6aa000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libpcre.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\22\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=118858, ...}) = 0
mmap(NULL, 2208000, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe23a283000
mprotect(0x7fe23a29e000, 2093056, PROT_NONE) = 0
mmap(0x7fe23a49d000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1a000) = 0x7fe23a49d000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/usr/lib/libudns.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`.\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=47624, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe23a8b8000
mmap(NULL, 2145280, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe23a077000
mprotect(0x7fe23a082000, 2093056, PROT_NONE) = 0
mmap(0x7fe23a281000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xa000) = 0x7fe23a281000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\30\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1811128, ...}) = 0
mmap(NULL, 3925176, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe239cb8000
mprotect(0x7fe239e6d000, 2093056, PROT_NONE) = 0
mmap(0x7fe23a06c000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b4000) = 0x7fe23a06c000
mmap(0x7fe23a072000, 17592, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fe23a072000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0pU\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=1030512, ...}) = 0
mmap(NULL, 3125544, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe2399bc000
mprotect(0x7fe239ab7000, 2093056, PROT_NONE) = 0
mmap(0x7fe239cb6000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xfa000) = 0x7fe239cb6000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe23a8b7000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe23a8b6000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe23a8b5000
arch_prctl(ARCH_SET_FS, 0x7fe23a8b6700) = 0
mprotect(0x7fe23a06c000, 16384, PROT_READ) = 0
mprotect(0x7fe239cb6000, 4096, PROT_READ) = 0
mprotect(0x7fe23a281000, 4096, PROT_READ) = 0
mprotect(0x7fe23a49d000, 4096, PROT_READ) = 0
mprotect(0x7fe23a6aa000, 4096, PROT_READ) = 0
mprotect(0x60d000, 4096, PROT_READ)     = 0
mprotect(0x7fe23a8ce000, 4096, PROT_READ) = 0
munmap(0x7fe23a8b9000, 76240)           = 0
clock_gettime(CLOCK_MONOTONIC, {680259, 540981130}) = 0
getuid()                                = 0
geteuid()                               = 0
getgid()                                = 0
getegid()                               = 0
gettimeofday({1420556063, 949088}, NULL) = 0
clock_gettime(CLOCK_MONOTONIC, {680259, 541065424}) = 0
epoll_create1(O_CLOEXEC)                = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
brk(0)                                  = 0x1241000
brk(0x1262000)                          = 0x1262000
eventfd2(0, O_NONBLOCK|O_CLOEXEC)       = 4
fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
fcntl(4, F_SETFL, O_RDONLY|O_NONBLOCK)  = 0
rt_sigaction(SIGCHLD, {0x7fe23a4a37f0, ~[RTMIN RT_1], SA_RESTORER|SA_RESTART, 0x7fe239cee150}, NULL, 8) = 0
open("/etc/sniproxy.conf", O_RDONLY)    = 5
fstat(5, {st_mode=S_IFREG|0644, st_size=1664, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe23a8cb000
read(5, "# sniproxy example configuration"..., 4096) = 1664
lseek(5, -1544, SEEK_CUR)               = 120
read(5, "user daemon\n\n# PID file\npidfile "..., 4096) = 1544
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
lseek(5, 1664, SEEK_SET)                = 1664
read(5, "", 4096)                       = 0
close(5)                                = 0
munmap(0x7fe23a8cb000, 4096)            = 0
rt_sigaction(SIGPIPE, {SIG_IGN, [PIPE], SA_RESTORER|SA_RESTART, 0x7fe239cee150}, {SIG_DFL, [], 0}, 8) = 0
socketpair(PF_FILE, SOCK_STREAM, 0, [5, 6]) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fe23a8b69d0) = 23275
close(6)                                = 0
setrlimit(RLIMIT_NOFILE, {rlim_cur=64*1024, rlim_max=64*1024}) = 0
open("/etc/localtime", O_RDONLY|O_CLOEXEC) = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=388, ...}) = 0
fstat(6, {st_mode=S_IFREG|0644, st_size=388, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe23a8cb000
read(6, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\2\0\0\0\0"..., 4096) = 388
lseek(6, -240, SEEK_CUR)                = 148
read(6, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\0\0\0\3\0\0\0\0"..., 4096) = 240
close(6)                                = 0
munmap(0x7fe23a8cb000, 4096)            = 0
getpid()                                = 23274
socket(PF_FILE, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 6
connect(6, {sa_family=AF_FILE, path="/dev/log"}, 110) = 0
sendto(6, "<13>Jan  6 22:54:23 sniproxy[232"..., 71, MSG_NOSIGNAL, NULL, 0) = 71
sendto(6, "<13>Jan  6 22:54:23 sniproxy[232"..., 75, MSG_NOSIGNAL, NULL, 0) = 75
exit_group(1)                           = ?

And:

# netstat -lptn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:1024            0.0.0.0:*               LISTEN      866/sshd        
tcp        0      0 127.0.0.1:9000          0.0.0.0:*               LISTEN      1488/php-fpm.conf)
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      1220/mysqld     
tcp        0      0 127.0.0.1:11211         0.0.0.0:*               LISTEN      1194/memcached  
tcp        0      0 107.191.58.54:80        0.0.0.0:*               LISTEN      2582/nginx.conf 
tcp        0      0 107.191.58.54:443       0.0.0.0:*               LISTEN      2582/nginx.conf 
tcp6       0      0 :::1024                 :::*                    LISTEN      866/sshd        
tcp6       0      0 2001:470:c:f04::2:80    :::*                    LISTEN      2582/nginx.conf 
tcp6       0      0 2001:470:c:f04::2:443   :::*                    LISTEN      2582/nginx.conf 
# sniproxy example configuration file
# lines that start with # are comments
# lines with only white space are ignored

user daemon

# PID file
pidfile /var/run/sniproxy.pid

error_log {
    # Log to the daemon syslog facility
    syslog deamon

    # Alternatively we could log to file
    #filepath /var/log/sniproxy.log

    # Control the verbosity of the log
    priority notice
}

listen 465 {
    proto tls
    table xmpp_imap_smtp
}

listen 993 {
    proto tls
    table xmpp_imap_smtp
}

listen 995 {
   proto tls
   table xmpp_imap_smtp
}

listen 5222 {
    proto tls
    table xmpp_imap_smtp
}

listen 5223 {
    proto tls
    table xmpp_imap_smtp
}

listen 5269 {
    proto tls
    table xmpp_imap_smtp
}

# named tables are defined with the table directive
table https_hosts {

    # WordPress
    (.*\.|)wp\.com$ *
    (.*\.|)wordpress\.com$ *

    # Wikipedia
    (.*\.|)wikipedia\.org$ *

    # Twitter
    (.*\.|)twimg\.com$ *
    (.*\.|)tinypic\.com$ *
    (.*\.|)twitpic\.com$ *
    (.*\.|)twitter\.com$ *

    # bit.ly
    bitly\.com *
    bit\.ly *

    # Google
    (.*\.|)googleapis\.com$ *
    (.*\.|)google\.com$ *
    (.*\.|)youtube\.com$ *
    (.*\.|)ytimg\.com$ *
    (.*\.|)googlehosted\.com$ *
    (.*\.|)googleusercontent\.com$ *
    (.*\.|)ggpht\.com$ *
    (.*\.|)gstatic\.com$ *
    (.*\.|)googlemail\.com$ *
    (.*\.|)googlecode\.com$ *
    (.*\.|)blogspot\.com$ *
    (.*\.|)gmail\.com$ *

    # Amazon
    (.*\.|)amazonaws.com *

    # CDN
    github\.global\.ssl\.fastly\.net *
    cdn\.sstatic\.net *
}

table xmpp_imap_smtp {
    (.*\.|)google\.com$ *
    (.*\.|)googlemail\.com$ *
    (.*\.|)gmail\.com$ *
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants