Showing posts with label network. Show all posts
Showing posts with label network. Show all posts

06 December, 2017

#How_Do_I_Find_Out_Linux_Gateway / #Router_IP_Address?

How do I find out my #gateway IP for a #computer or a #network device that allows or controls access to another computer or network under #Linux / #UNIX operating systems?
The ansver is almost simple for unix users...

A gateway is a network point that acts as an entrance to another network. On the Internet, a node or stopping point can be either a gateway node or a host (end-point) node. Both the computers of Internet users and the computers that serve pages to users are host nodes. The computers that control traffic within your company’s network or at your local Internet service provider (ISP) are gateway nodes. In the network for an enterprise, a computer server acting as a gateway node is often also acting as a proxy server and a firewall server. A gateway is often associated with both a router, which knows where to direct a given packet of data that arrives at the gateway, and a switch, which furnishes the actual path in and out of the gateway for a given packet.

You need to use route command. Open an Terminal and type this command will show you #IP_routing_tables. It can be also use to print gateway / router IP address. Type the following command to see #default_gateway:

$ route -n
Output:

Kernel IP routing table
Destination    Gateway       Genmask           Flags   Metric   Ref   Use   Iface
0.0.0.0           192.168.1.1   0.0.0.0               UG     100         0      0       enp5s0
192.168.1.0   0.0.0.0           255.255.255.0   U        100         0      0       enp5s0

192.168.1.1 is gateway IP address for our computer.
The flag:
U indicates that route is up
G indicates that it is gateway.

10 September, 2015

NMAP scan your network

Nmap exempels
quick scan of your network

nmap -T Aggressive -v -n 192.168.0.100-200


will look like this scan...

....
Discovered open port 9001/tcp on 192.168.0.31
Discovered open port 6200/tcp on 192.168.0.34
Discovered open port 3151/tcp on 192.168.0.37
Discovered open port 261/tcp on 192.168.0.2
Discovered open port 991/tcp on 192.168.0.13
SYN Stealth Scan Timing: About 32.42% done; ETC: 20:05 (0:01:05 remaining)
Discovered open port 7000/tcp on 192.168.0.123
Discovered open port 3322/tcp on 192.168.0.159
Discovered open port 6005/tcp on 192.168.0.142
Discovered open port 89152/tcp on 192.168.0.183
...

Nmap scan report for 192.168.0.168
Host is up (0.00062s latency).
Not shown: 997 closed ports
PORT   STATE SERVICE
23/tcp open  telnet
53/tcp open  domain
80/tcp open  http
MAC Address: 00:00:00:00:00:00 (Cisco-Linksys)

Nmap scan report for 192.168.0.177
Host is up (0.0051s latency).
All 1000 scanned ports on 192.168.0.177 are closed
MAC Address: 0C:71XXXXXXX (Samsung Electronics Co.)

Initiating SYN Stealth Scan at 20:05
Scanning 192.168.0.14 [1000 ports]
Discovered open port 139/tcp on 192.168.0.14
Discovered open port 445/tcp on 192.168.0.14
Completed SYN Stealth Scan at 20:05, 1.67s elapsed (1000 total ports)
Nmap scan report for 192.168.0.14
Host is up (0.0000070s latency).

15 January, 2013

...connect to a Wireless Network from Terminal...

How do I connect to a Wireless Network from Terminal-only?


View available wireless networks:
Code:
iwlist  scan
(Replacing with your wireless interface [for example mine is eth2)
If you don't get any networks listed:

Code:
ifconfig  up
To turn on your wireless interface.
If your wireless network is WPA encrypted:

Code:
iwconfig  essid  key s:
(Note: I use "s:" so that I can enter my key in ASCII form e.g. "Kll4Wx"
If your network isn't secured:

Code:
iwconfig  essid 
I hope this helps, if you want more help just let me know!

20 May, 2010

3G, Oister, TDC, Telia, bredbånd og Ubuntu

Ubuntu 10.04 og Oister mobilbredbånd (model Huawei E1550 - 2Mbit)

Problemet er at USB stick'en har 2 modes, dels en USB-Storages- og dels

en USB-Seriel mode.

I opstartsmode, optræder den som en USB-Storages mode, da Windows

driverne ligger der og skal installeres derfra.

Linux har ikke behov for driverne, da de allerede findes i kernen.


Det handler så om, at få skiftet tilstand fra USB-Storage til USB-Seriel.


Til det formål installeres "usb-modeswitch"

Det gør du ved at bruge
apt-get install usb-modeswitch usb-modeswitch-data

når det gjort tilføjer du Oister Mobil i network manager ...
så vil Oister dogle automatisk koble sig på mobil bredbånd.

Du skal selfølgelig tilføje APN for din operatør i din Mobile Bredbånd Manager.

Højre klik på din Network Manager
Vælg Edit Connections
Vælg faneblad Mobile Bredband

Vælg Add (tilføj)

Tryk Foward
Vælg Danmark
Vælg provider (operatør)

Tryk Foward
Vælg Standard


Apply tilsidst


evt hak flueben af Connect automatically


Tryk OK
(nu har du tilføjet APN for din mobile bredbånd)


nu kunne du unplug og plugin din mobile bredbånd i computeren,
og hvis du har vælgt automatisk tilsluting under processen,
så går der op til 30 sek og du er forbundet..


p.s. ved at skrive denne artikel var jeg fobundet med Oister bredbånd.

27 June, 2009

Static IP or DHCP Configuration on Ubuntu / Debian

How to configure Ubuntu Linux with
static or dynamic (dhcp) IP
by morphus.dk

File: /etc/network/interfaces

Static IP example:
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 208.88.34.106
netmask 255.255.255.248
broadcast 208.88.34.111
network 208.88.34.104
gateway 208.88.34.110

Dynamic IP (DHCP) example:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

auto eth1
iface eth1 inet dhcp

auto eth2
iface eth2 inet dhcp

auto ath0
iface ath0 inet dhcp

auto wlan0
iface wlan0 inet dhcp
Interfaces:
  • lo: Loopback interface (network within your system without slowing down for the real ethernet based network)
  • eth0: First ethernet interface card
  • wlan0: First wireless network interface

Also see "man interfaces"