S
S
smartlight2012-06-26 13:44:22
linux
smartlight, 2012-06-26 13:44:22

How to configure dhcp settings received from the Internet provider?

Good afternoon all-knowing ALL.
There is a router with two network eth0 LAN and eth1 - Internet.
The provider gives settings on DHCP.
BUT, as usual, it sends its nameserver, and accordingly overwrites my settings in resolv.conf.
I have a BIND caching DNS server configured and it is written in resolv.conf The nameserver 127.0.0.1
question is how and how to adjust the settings that my network receives?
question number 2 is also from this opera - the provider gives the route:

# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.100.3   0.0.0.0         UG    0      0        0 eth1
192.168.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth1
192.168.12.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0

everything is as if nothing, but it is alarming that he takes a lot for himself, but the following scares me:
on a remote server I have a terminal server configured with ip 192.168. 100 .210 and users behind eth0 will need to connect to it. When establishing a connection using openvpn, judging by the route table, everything is OK:
route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.100.3   0.0.0.0         UG    0      0        0 eth1
192.168.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth1
192.168.12.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0
192.168.30.0    192.168.30.57   255.255.255.0   UG    0      0        0 tun0
192.168.30.57   0.0.0.0         255.255.255.255 UH    0      0        0 tun0
192.168.100.0   192.168.30.57   255.255.255.0   UG    0      0        0 tun0



 Host         Loss%   Snt   Last   Avg  Best  Wrst StDev
 1. 192.168.30.42                                      0.0%     7  114.9 113.3 112.0 114.9   1.1
 2. 192.168.100.210                                   0.0%     6  113.6 113.9 111.3 116.5   2.1

but when scanning ports on 192.168.100.210, I get nothing, although I should see several ports open.
I don’t know how to deal with this situation - maybe the omniscient ALL will tell you?

Answer the question

In order to leave comments, you need to log in

6 answer(s)
A
adminimus, 2012-06-26
@smartlight

Regarding DNS, I have a similar situation.
prepend domain-name-servers 127.0.0.1;
In debian, I decided as follows: I added By routes to the end of /etc/dhcp/dhclient.conf . What do `traceroute 192.168.100.210` and `ip route get 192.168.100.210` say?

F
Flaxing, 2012-06-26
@Flaxing

vi /etc/sysconfig/network-scripts/ifcfg-eth1
press Insert, specify BOOTPROTO=DHCP and delete the values ​​of the parameters IPADDR, NETMASK, BROADCAT, NETWORK, GATEWAY
then Esc: wq Enter after
service network restart

1
1x1, 2012-06-26
@1x1

man dhcpcd, and specifically
-R
Prevents dhcpcd from replacing existing /etc/resolv.conf file.

A
Alexey Zhurbitsky, 2012-06-26
@blo

try adding to /etc/dhcp/dhclient.conf

option domain-name-servers 127.0.0.1

L
Lev Lybin, 2012-06-26
@lybin

by dhcp:
freeblack.ru/2010/04/dhcp-vs-resolv-conf/
or google about dhcp do not update resolv.conf
at 192.168.100.210:
one of the options is that if you change the server address just so that it is not in the range ?
another option is to try specifying hard routing using the iproute utility, I won’t tell you more specifically, I haven’t worked with this for a long time

E
Eugene, 2012-06-28
@Lorien_Elf

On the first one: try to write your settings in resolv.conf.head.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question