I am quite aware of the networking. But I have a confusion which I am searching over internet but did not come to any solution.

Can we assign any specific IP to our PC or any device. Like I want to use 111.222.XXX.XXX IP as my public IP.

I think some one used my public IP and sent some spam emails to others. and one of them have contacted to POLICE.

What could be other options to do this. According to my knowledge. They found the IP from header of Gmail.

I am just sorting it out. IP used is ipv4

1 Answer 1


You don't appear to be as aware of the networking as you think. But let's go anyway.

First, nothing stops you from assigning 111.222.xxx.xxx as your PC IP address. It's your PC after all, you can put anything you want. But you will accomplish nothing with this.

Why? A lot of reasons:

  • Default gateway:

    You probably aren't on the 111.222.xxx.xxx network (let's assume is 222.123.yyy.yyy. You must send the packets to the default gateway for your invented network, but your real network does not know it. You can try to add this as a default network, you OS will deny it, or put the rule and send packets nowhere.

    • Egress Filtering:

    Lets say you somehow managed to send the packets to your real default gateway, with an IP from another network. They will be dropped right away by the egress filter:

    TCP/IP packets that are being sent out of the internal network are examined via a router, firewall, or similar edge device. Packets that do not meet security policies are not allowed to leave - they are denied "egress".

    Your ISP knows all the IP blocks belonging to him. If any packet tries to get out of their network having a foreign source address, they will drop it.

  • Routing:

    If you got a badly configured ISP, and all the way badly configured upstream ISPs until the destination (absolutely, astronomically improbable), you will reach some endpoint somewhere. The OS will read the SYN flag (assuming it's a TCP packet), and send back the SYN+ACK. And you know where the packet goes? To the 111.222.xxx.xxx network, not your own network. It will never ever reach your PC. It will travel all way down to the rightfully owner of the IP you put on your PC, knock on a closed door, and be greated with an ICMP code 3 back: Destination port unreachable, or will be silently dropped. And the connection attempt dies right there.

So, the answer is No. Nobody can put your IP address on their systems and frame you. But they can break into your system, install a proxy, and use a proxy running on your PC to do anything, and your IP will be all over there. Or they can break your wifi password, and do the same.

  • use a proxy running on your PC to do anything, and your IP will be all over there. Can you explain this. how it can be happen ? or can give me some link to read.
    – Adnan Ali
    Feb 23, 2016 at 7:19
  • I install a proxy on your computer, and connect to it. Every traffic I send will be routed to your computer, and your computer will establish the connection. Try to watch this: youtube.com/watch?v=BsfPqutLh7U
    – ThoriumBR
    Feb 23, 2016 at 13:37
  • oh, I see. I already knew that. But it is only to useable for web surfing. But let suppose User send an email via google. Then what IP email header will contain. User IP or Proxy IP ?
    – Adnan Ali
    Feb 26, 2016 at 10:26
  • A proxy is not only used for surfing. You can use a proxy even for port scanning, torrent downloading, streaming, P2P downloads. RFC stats that every proxy must include the Via header, including the IP of the originator. But I am sure a proxy made to hide the real owner of the connection will not include this header, so your IP will be used when connecting.
    – ThoriumBR
    Feb 26, 2016 at 12:10
  • As you said "so your IP will be used when connecting." It means IP of server (Proxy Server ) or IP of user will b included in header ?
    – Adnan Ali
    Feb 26, 2016 at 12:15

Not the answer you're looking for? Browse other questions tagged .