I want to forward a range of ports like 2001to2500 with go simple tunnel.
Ive instlled it and in the
/usr/lib/systemd/system/gost.Service
i put this code :
[Unit]
Description=GO Simple Tunnel
After=network.target
Wants=network.target
[Service]
Type=simple
ExecStart=/usr/local/bin/gost -L tcp://:2003/127.0.0.1:2003 -L tcp://:2001/127.0.0.1:2001 -L tcp://:2002/127.0.0.1:2002 -L -F relay+kcp://91.107.169.213:456
[Install]
WantedBy=multi-user.target
----(--(-----
BUt by adding this
-L tcp://:2002/127.0.0.1:2002
only can go far up till 10 or 15 ports and then it wont work.
IIf you can plz help im trying access free internet in i r a n because they done hardcore cencorship after people have been risen up to the dictator ship. I really need your help`your text
Related
I'm trying to provide a splashscreen for Raspbian Stretch using fbi. Based upon some tutorials I found here my situation:
/etc/systemd/system/splashscreen.service
[Unit]
Description=Splash screen
DefaultDependencies=no
After=local-fs.target
[Service]
ExecStart=/usr/bin/fbi -T 1 -d /dev/fb0 --noverbose /opt/logo.png
[Install]
WantedBy=sysinit.target
enabled (checked the symlink under sysinit.target.wants).
/boot/cmdline.txt
dwc_otg.lpm_enable=0 console=tty1 root=PARTUUID=ee397c53-02 rootfstype=ext4 elevator=deadline rootwait quiet logo.nologo loglevel=1 fsck.mode=skip noswap ro consoleblank=0
p
/boot/config.txt
hdmi_drive=2
dtparam=i2c_arm=on
dtparam=spi=on
dtparam=audio=on
dtparam=i2c1=on
dtoverlay=i2c-rtc,ds1307
disable_splash=1
Executing the exactly same command (fbi -T 1 -d /dev/fb0 --noverbose /opt/logo.png) from prompt leads to show the image as expected.
In the boot messages I can't find any error. Any thought?
I finally got this to work! Here's what I did (essentially copied from https://yingtongli.me/blog/2016/12/21/splash.html, with a few small changes that made it work for me).
Install fbi: apt install fbi
Create /etc/systemd/system/splashscreen.service with:
[Unit]
Description=Splash screen
DefaultDependencies=no
After=local-fs.target
[Service]
ExecStart=/usr/bin/fbi --noverbose -a /opt/splash.png
StandardInput=tty
StandardOutput=tty
[Install]
WantedBy=sysinit.target
The only thing I did differently from the article linked above is remove the -d flag from the /usr/bin/fbi command (the command was originally /usr/bin/fbi -d /dev/fb0 --noverbose -a /opt/splash.png). I'm guessing fb0 was the wrong device and leaving it out just means fbi will use the current display device and gets it right.
Put your splash images in /opt/splash.png.
Enable the service: systemctl enable splashscreen
I'm still trying to figure out how to get rid of the rest of the boot text, but this is a step in the right direction.
I'm using ucarp over linux bonding for high availability and automatic failover of two servers.
Here are the commands I used on each server for starting ucarp :
Server 1 :
ucarp -i bond0 -v 2 -p secret -a 10.110.0.243 -s 10.110.0.229 --upscript=/etc/vip-up.sh --downscript=/etc/vip-down.sh -b 1 -k 1 -r 2 -z
Server 2 :
ucarp -i bond0 -v 2 -p secret -a 10.110.0.243 -s 10.110.0.242 --upscript=/etc/vip-up.sh --downscript=/etc/vip-down.sh -b 1 -k 1 -r 2 -z
and the content of the scripts :
vip-up.sh :
#!/bin/sh
exec 2> /dev/null
/sbin/ip addr add "$2"/24 dev "$1"
vip-down.sh :
#!/bin/sh
exec 2> /dev/null
/sbin/ip addr del "$2"/24 dev "$1"
Everything works well and the servers switch from one to another correctly when the master becomes unavailable.
The problem is when I unplug both servers from the switch for a too long time (approximatively 30 min). As they are unplugged they both think they are master,
and when I replug them, the one with the lowest ip address tries to stay master by sending gratuitous arps. The other one switches to backup as expected, but I'm unable to access the master through its virtual ip.
If I unplug the master, the second server goes from backup to master and is accessible through its virtual ip.
My guess is that the switch "forgets" about my servers when they are disconnected from too long, and when I reconnect them, it is needed to go from backup to master to update correctly switch's arp cache, eventhough the gratuitous arps send by master should do the work. Note that restarting ucarp on the master does fix the problem, but I need to restart it each time it was disconnected from too long...
Any idea why it does not work as I expected and how I could solve the problem ?
Thanks.
I can run the following command to accomplish what I am trying to do, however I would like to setup entries in my ~/.ssh/config to handle a transparent jump:
ssh -tt login.domain.org gsissh -tt -p 2222 remote.behind.wall.domain.org
Note that the second hop MUST be made with gsissh, some info can be found here: http://toolkit.globus.org/toolkit/docs/5.0/5.0.4/security/openssh/pi/
AFAIK this precludes the standard use of netcat or the -W flag in the ProxyCommand option in the .ssh/config. I think this is because ssh will try to use ssh instead of gsissh on the intermediate machine.
If I put something like this in my .ssh/config it will hop through to the target machine, but when I exit I will land in a shell on the intermediate machine and it borks my ControlMaster setup—the next time I try to ssh to the final destination I end up on the intermediate machine
Host dest
HostName login.domain.org
PermitLocalCommand yes
LocalCommand gsissh -p 2222 remote.behind.wall.domain.org
Also, it seems that trickery using -L or -R is disabled for security reasons.
I would love some help if anybody has any tips.
Thanks
How can I check, how many connections are established for example on port 80 and then write it to the file using bash console?
I've read that netstat can do this, but I can not find , what exactly should I do with that, as I'm newbie on "Unix" systems.
You probably want sockstat if you're on FreeBSD:
sockstat -c -L -P tcp -p 80
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
lsof is an increadibly powerful command-line utility for unix systems. It lists open files, displaying information about them. And since most everything is a file on unix systems, lsof can give sysadmins a ton of useful diagnostic data.
What are some of the most common and useful ways of using lsof, and which command-line switches are used for that?
To show all networking related to a given port:
lsof -iTCP -i :port
lsof -i :22
To show connections to a specific host, use #host
lsof -i#192.168.1.5
Show connections based on the host and the port using #host:port
lsof -i#192.168.1.5:22
grepping for LISTEN shows what ports your system is waiting for connections on:
lsof -i| grep LISTEN
Show what a given user has open using -u:
lsof -u daniel
See what files and network connections a command is using with -c
lsof -c syslog-ng
The -p switch lets you see what a given process ID has open, which is good for learning more about unknown processes:
lsof -p 10075
The -t option returns just a PID
lsof -t -c Mail
Using the -t and -c options together you can HUP processes
kill -HUP $(lsof -t -c sshd)
You can also use the -t with -u to kill everything a user has open
kill -9 $(lsof -t -u daniel)
lsof -i :port
will tell you what programs are listening on a specific port.
lsof -i will provide a list of open network sockets. The -n option will prevent DNS lookups, which is useful when your network connection is slow or unreliable.
lsof +D /some/directory
Will display recursively all the files opened in a directory. +d for just the top-level.
This is useful when you have high wait% for IO, correlated to use on a particular FS and want to see which processes are chewing up your io.
See what files a running application or daemon has open:
lsof -p pid
Where pid is the process ID of the application or daemon.
lsof +f -- /mountpoint
lists the processes using files on the mount mounted at /mountpoint. Particularly useful for finding which process(es) are using a mounted USB stick or CD/DVD.