Hot answers tagged

2

You can use grepcidr to check if an IP addresss is in a list of CIDR networks. #! /bin/bash NETWORKS="108.161.176.0/20 94.46.144.0/20 146.88.128.0/20 198.232.124.0/22 23.111.8.0/22 217.22.28.0/22 64.125.76.64/27 64.125.76.96/27 64.125.78.96/27 64.125.78.192/27 64.125.78.224/27 64.125.102.32/27 64.125.102.64/27 64.125.102.96/27 ...


2

What you are attempting to do doesn't make any sense. You are trying to create two TCP sockets with the same 5-tuple { SRC-IP, SRC-PORT, DST-IP, DST-PORT, PROTO } therefore the two sockets would be indistinguishable from each other. Think of it this way: if this were allowed, then, when a TCP packet arrives sourced from 127.0.0.1:80 and destined to ...


1

This one will give you your public IP, remove /ip part to see more info. $ curl ipinfo.io/ip


1

You can try to use some dynamic dns services like noip.com Then You can access resources by dns name, which will changing according to Your ip.


1

This is a script ipcrossover I wrote a while ago but it should still work. It sets up iptables so that you can send packets "to yourself", which is normally short-circuited by the kernel. It is based on these answers. #!/bin/bash # posted in http://unix.stackexchange.com/a/275888/119298 by meuh # see http://serverfault.com/q/127636/294707 # cmcginty Apr 2 ...


1

I have at my disposal ... physical access to the server. Log in directly at the server console (assuming it has one, most unices do). You want to bring or borrow an external display, unless there is KVM at your disposal, but small LCD displays are lightweight. Configuring DHCP client depends heavily on your OS and distribution, as a first step try ...



Only top voted, non community-wiki answers of a minimum length are eligible