[Mageia-discuss] Temporarily changing IP address
alien at rmail.be
Tue May 22 17:59:59 CEST 2012
> On 22/05/12 15:08, AL13N wrote:
>>>>> No :-( No difference, even though I restarted the network
>>> Lets start from scratch.
>>> But first, can you tell me the ip address of the NAS and your
>>> laptop's IP address for eth0.
>>> After making note of these, put the laptop back to it's original
>>> config. (i.e. remove the manually created interface) and set
>>> wlan0 not to come up on reboot. Then restart so you only have an
>>> ip address on eth0.
>>> Then send me the info.
>> in fact, if we want it to be even simpler, you could add the ip
>> address without a alias interface wit iproute2
>> # ip addr show eth0
> # ip addr show eth0
> 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
> state UP qlen 1000
> link/ether 1c:75:08:28:bd:e4 brd ff:ff:ff:ff:ff:ff
> inet 169.254.100.1/24 brd 169.254.100.255 scope global eth0
> inet6 fe80::1e75:8ff:fe28:bde4/64 scope link
> valid_lft forever preferred_lft forever
>> # ip addr add www.xxx.yyy.zzz/netmask dev eth0
> # ip addr add www.192.168.0.20/255.255.255.0 dev eth0
> Error: an inet prefix is expected rather than
> Not sure what it is expecting.
hum, i meant the socalled CIDR notation: 4 parts of ip address followed by
a subnet mask,
in your case, i'd do:
# ip addr add 192.168.0.20/24 dev eth0
then if you do
# ip addr show eth0
again, you'd see it was there, as well as the extra route for that range:
# ip route
>> this will add an ip address on that interface, and
>> # ip route
>> if you're done:
>> # ip addr del www.xxx.yyy.zzz/netmask dev eth0
>> should now show you a route into that different subnet
>> this means, no mess with alias interfaces or separate settings, or
>> to be sure, restart shorewall service (in the event it filters on
>> the interface ip addresses)
> Shorewall and iptables are currently stopped.
Be careful of this, in your case, it might not matter, but shorewall stop
has policy DROP, (i think), allthough iptables should have policy ACCEPT.
so, you'd have to stop shorewall first, then stop iptables.
personally, i'd rather not stop the firewall, due to security reasons
though. but since with this solution, you don't have any extra interface,
even just restarting it would be fine.
if you want to debug even further:
# tcpdump -n -i eth0 host <nas_ip>
and try to connect and then you can see what sourceip and destip are set
and if a reply is coming back.
More information about the Mageia-discuss